Skip to content

Commit

Permalink
lsb-release: rewrite with replaceVars, and use @runtimeShell@ (Ni…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksanaa authored Dec 7, 2024
2 parents a5a9198 + d1589ac commit c7664ca
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion pkgs/by-name/ls/lsb-release/lsb_release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#! @shell@
#! @runtimeShell@

set -o errexit
set -o nounset
Expand Down
44 changes: 24 additions & 20 deletions pkgs/by-name/ls/lsb-release/package.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
{ substituteAll, lib
, coreutils, getopt
{
replaceVars,
runCommand,
lib,
runtimeShell,
coreutils,
getopt,
}:

substituteAll {
name = "lsb_release";

src = ./lsb_release.sh;

dir = "bin";
isExecutable = true;

inherit coreutils getopt;

meta = with lib; {
description = "Prints certain LSB (Linux Standard Base) and Distribution information";
mainProgram = "lsb_release";
license = [ licenses.mit ];
maintainers = with maintainers; [ primeos ];
platforms = platforms.linux;
};
}
runCommand "lsb_release"
{
meta = with lib; {
description = "Prints certain LSB (Linux Standard Base) and Distribution information";
mainProgram = "lsb_release";
license = [ licenses.mit ];
maintainers = with maintainers; [ primeos ];
platforms = platforms.linux;
};
}
''
install -Dm 555 ${
replaceVars ./lsb_release.sh {
inherit runtimeShell coreutils getopt;
}
} $out/bin/lsb_release
''

0 comments on commit c7664ca

Please sign in to comment.