diff options
author | Lucas Franceschino <lucas.franceschino@inria.fr> | 2022-12-16 20:01:24 +0100 |
---|---|---|
committer | Lucas Franceschino <lucas.franceschino@inria.fr> | 2022-12-20 11:49:08 +0100 |
commit | 1018df456cc8f031f4c78b65d3971f4ecaef088c (patch) | |
tree | 65ab2c716cac7da38fc6be0eb36a286d1b648141 /pkgs/development/compilers/fstar | |
parent | 762426b0dcf065a8badbc0f7b4b868980ff8ace0 (diff) |
fstar: remove unnecessary store path & build artifacts
Diffstat (limited to 'pkgs/development/compilers/fstar')
-rw-r--r-- | pkgs/development/compilers/fstar/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/compilers/fstar/default.nix b/pkgs/development/compilers/fstar/default.nix index e38f416b261b..d084889dcac9 100644 --- a/pkgs/development/compilers/fstar/default.nix +++ b/pkgs/development/compilers/fstar/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, writeScript, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles }: +{ lib, stdenv, writeScript, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles, removeReferencesTo }: stdenv.mkDerivation rec { pname = "fstar"; @@ -16,6 +16,7 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ makeWrapper installShellFiles + removeReferencesTo ] ++ (with ocamlPackages; [ ocaml findlib @@ -55,6 +56,10 @@ stdenv.mkDerivation rec { mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstarlib ''; postInstall = '' + # Remove build artifacts + find $out -name _build -type d | xargs -I{} rm -rf "{}" + remove-references-to -t '${ocamlPackages.ocaml}' $out/bin/fstar.exe + wrapProgram $out/bin/fstar.exe --prefix PATH ":" "${z3}/bin" installShellCompletion --bash .completion/bash/fstar.exe.bash installShellCompletion --fish .completion/fish/fstar.exe.fish |