mirror of
https://git.sr.ht/~bryan_bennett/flake_env
synced 2025-12-17 07:01:23 +01:00
Update flake and conventions for 24.05+
This commit is contained in:
parent
33d91a5af4
commit
bc779a2764
5 changed files with 48 additions and 84 deletions
13
default.nix
13
default.nix
|
|
@ -4,11 +4,8 @@
|
|||
, buildDunePackage
|
||||
, core
|
||||
, core_unix
|
||||
, coreutils
|
||||
, findlib
|
||||
, lib
|
||||
, nix-filter
|
||||
, ocaml
|
||||
, ppx_yojson_conv
|
||||
, ppx_yojson_conv_lib
|
||||
, re
|
||||
|
|
@ -36,14 +33,18 @@ buildDunePackage {
|
|||
};
|
||||
duneVersion = "3";
|
||||
doCheck = true;
|
||||
# We strip by hand before packing
|
||||
dontStrip = true;
|
||||
# patchELF can't handle UPX'd binaries
|
||||
# We produce a static OCaml binary that
|
||||
dontPatchELF = true;
|
||||
postPatch = ''
|
||||
substituteInPlace direnvrc --replace "@flake_env@" "$out/bin/flake_env"
|
||||
substituteInPlace tests/spit*.sh --replace "/usr/bin/env" "${coreutils}/bin/env"
|
||||
substituteInPlace direnvrc --replace-fail "@flake_env@" "$out/bin/flake_env"
|
||||
'';
|
||||
postInstall = ''
|
||||
${bintools}/bin/strip --strip-unneeded $out/bin/flake_env
|
||||
${upx}/bin/upx $out/bin/flake_env
|
||||
install -m400 -D direnvrc $out/share/flake_env/direnvrc
|
||||
install -m444 -D direnvrc $out/share/flake_env/direnvrc
|
||||
'';
|
||||
buildInputs = [
|
||||
core
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue