Skip to content

Commit

Permalink
buildFHSEnv: simplify pname/name logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MattSturgeon committed Jan 7, 2025
1 parent 6b8fafc commit 914fdee
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkgs/build-support/build-fhsenv-bubblewrap/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
}:

{
pname ? throw "You must provide either `name` or `pname`",
version ? throw "You must provide either `name` or `version`",
name ? "${pname}-${version}",
runScript ? "bash",
nativeBuildInputs ? [ ],
extraInstallCommands ? "",
executableName ? args.pname or args.name,
executableName ? args.pname or name,
meta ? { },
passthru ? { },
extraPreBwrapCmds ? "",
Expand All @@ -31,8 +34,6 @@
...
}@args:

assert (!args ? pname || !args ? version) -> (args ? name); # You must provide name if pname or version (preferred) is missing.

let
inherit (lib)
concatLines
Expand All @@ -49,7 +50,6 @@ let
# explicit about which package set it's coming from.
inherit (pkgsHostTarget) pkgsi686Linux;

name = args.name or "${args.pname}-${args.version}";
# we don't know which have been supplied, and want to avoid defaulting missing attrs to null. Passed into runCommandLocal
nameAttrs = lib.filterAttrs (
key: value:
Expand Down

0 comments on commit 914fdee

Please sign in to comment.