From 6cd157f0133bcd074ff947f3e5397f0e8cdc2830 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Sun, 8 Dec 2019 15:06:59 +0100 Subject: machines/profpatsch,pkgs/profpatsch: rm `execlineb-with-builtins` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This has been upstreamed to nixpkgs proper, as a C wrapper script, in https://github.com/NixOS/nixpkgs/pull/71357 So we don’t even need bash to run execline anymore :P --- pkgs/profpatsch/default.nix | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'pkgs/profpatsch/default.nix') diff --git a/pkgs/profpatsch/default.nix b/pkgs/profpatsch/default.nix index d973b63e..f484c2ad 100644 --- a/pkgs/profpatsch/default.nix +++ b/pkgs/profpatsch/default.nix @@ -3,32 +3,6 @@ let inherit (pkgs) callPackage; - # wrapper for execlineb that doesn’t need the execline commands - # in PATH to work (making them appear like “builtins”) - # TODO: upstream into nixpkgs - # TODO: the grep could be nicer - execlineb-with-builtins = - let eldir = "${pkgs.execline}/bin"; - in pkgs.writeScriptBin "execlineb" '' - #!${eldir}/execlineb -s0 - # appends the execlineb bin dir to PATH if not yet in PATH - ${eldir}/define eldir ${eldir} - ''${eldir}/ifelse - { - # since this is nix, we can grep for the execline drv hash in PATH - # to see whether it’s already in there - ''${eldir}/pipeline - { ${pkgs.coreutils}/bin/printenv PATH } - ${pkgs.gnugrep}/bin/grep --quiet "${eldir}" - } - # it’s there already - { ''${eldir}/execlineb $@ } - # not there yet, add it - ''${eldir}/importas oldpath PATH - ''${eldir}/export PATH "''${eldir}:''${oldpath}" - ''${eldir}/execlineb $@ - ''; - # Takes a derivation and a list of binary names # and returns an attribute set of `name -> path`. # The list can also contain renames in the form of @@ -65,8 +39,7 @@ let # todo: factor out calling tests let it = import ./execline/run-execline.nix { - bin = (getBins execlineb-with-builtins [ "execlineb" ]) - // (getBins pkgs.execline [ "redirfd" "importas" "exec" ]); + bin = getBins pkgs.execline [ "execlineb" "redirfd" "importas" "exec" ]; inherit stdenv lib; }; itLocal = name: args: execline: @@ -85,8 +58,8 @@ let inherit (testing) drvSeqL; inherit (pkgs) coreutils; inherit stdenv; - bin = (getBins execlineb-with-builtins [ "execlineb" ]) - // (getBins pkgs.execline [ + bin = (getBins pkgs.execline [ + "execlineb" { use = "if"; as = "execlineIf"; } "redirfd" "importas" ]) @@ -100,7 +73,7 @@ let }; writeExeclineFns = import ./execline/write-execline.nix { - inherit pkgs execlineb-with-builtins; + inherit pkgs; }; -- cgit 1.4.1