nixos/wrapper: add basename of the wrapped program to the wrappers name to easily identify it

Also fix the comment with test instructions
This commit is contained in:
Sandro Jäckel
2023-12-24 20:36:12 +01:00
parent 79fee6027b
commit 35ca689119
+2 -2
View File
@@ -1,8 +1,8 @@
{ stdenv, unsecvars, linuxHeaders, sourceProg, debug ? false }:
# For testing:
# $ nix-build -E 'with import <nixpkgs> {}; pkgs.callPackage ./wrapper.nix { parentWrapperDir = "/run/wrappers"; debug = true; }'
# $ nix-build -E 'with import <nixpkgs> {}; pkgs.callPackage ./wrapper.nix { sourceProg = "${pkgs.hello}/bin/hello"; debug = true; }'
stdenv.mkDerivation {
name = "security-wrapper";
name = "security-wrapper-${baseNameOf sourceProg}";
buildInputs = [ linuxHeaders ];
dontUnpack = true;
CFLAGS = [