forked from mirrors/nixpkgs
fstar: remove unnecessary store path & build artifacts
This commit is contained in:
parent
762426b0dc
commit
1018df456c
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, writeScript, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles }:
|
{ lib, stdenv, writeScript, fetchFromGitHub, z3, ocamlPackages, makeWrapper, installShellFiles, removeReferencesTo }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "fstar";
|
pname = "fstar";
|
||||||
|
@ -16,6 +16,7 @@ stdenv.mkDerivation rec {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper
|
makeWrapper
|
||||||
installShellFiles
|
installShellFiles
|
||||||
|
removeReferencesTo
|
||||||
] ++ (with ocamlPackages; [
|
] ++ (with ocamlPackages; [
|
||||||
ocaml
|
ocaml
|
||||||
findlib
|
findlib
|
||||||
|
@ -55,6 +56,10 @@ stdenv.mkDerivation rec {
|
||||||
mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstarlib
|
mkdir -p $out/lib/ocaml/${ocamlPackages.ocaml.version}/site-lib/fstarlib
|
||||||
'';
|
'';
|
||||||
postInstall = ''
|
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"
|
wrapProgram $out/bin/fstar.exe --prefix PATH ":" "${z3}/bin"
|
||||||
installShellCompletion --bash .completion/bash/fstar.exe.bash
|
installShellCompletion --bash .completion/bash/fstar.exe.bash
|
||||||
installShellCompletion --fish .completion/fish/fstar.exe.fish
|
installShellCompletion --fish .completion/fish/fstar.exe.fish
|
||||||
|
|
Loading…
Reference in a new issue