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-09-13 19:16:42 +02:00
parent 79fee6027b
commit 35ca689119
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

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 = [