diff options
author | Gerg-L <GregLeyda@proton.me> | 2023-08-07 20:48:28 -0400 |
---|---|---|
committer | Gerg-L <GregLeyda@proton.me> | 2023-08-07 20:52:46 -0400 |
commit | c0790c094cd59b3104912404e915ce57eabfcc17 (patch) | |
tree | ca327dee67491fd3a3d91f9d119c109c572a2e46 /pkgs/shells/dash | |
parent | 5ec1939e0f1c9fbd6fd7cb67615a4763ccd188f2 (diff) | |
download | nixpkgs-c0790c094cd59b3104912404e915ce57eabfcc17.tar nixpkgs-c0790c094cd59b3104912404e915ce57eabfcc17.tar.gz nixpkgs-c0790c094cd59b3104912404e915ce57eabfcc17.tar.bz2 nixpkgs-c0790c094cd59b3104912404e915ce57eabfcc17.tar.lz nixpkgs-c0790c094cd59b3104912404e915ce57eabfcc17.tar.xz nixpkgs-c0790c094cd59b3104912404e915ce57eabfcc17.tar.zst nixpkgs-c0790c094cd59b3104912404e915ce57eabfcc17.zip |
dash: Add meta.mainProgram and cleanup
Diffstat (limited to 'pkgs/shells/dash')
-rw-r--r-- | pkgs/shells/dash/default.nix | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/pkgs/shells/dash/default.nix b/pkgs/shells/dash/default.nix index ff4656f6650..6bdbd1798e3 100644 --- a/pkgs/shells/dash/default.nix +++ b/pkgs/shells/dash/default.nix @@ -8,13 +8,13 @@ , dash }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "dash"; version = "0.5.12"; src = fetchurl { - url = "http://gondor.apana.org.au/~herbert/dash/files/${pname}-${version}.tar.gz"; - sha256 = "sha256-akdKxG6LCzKRbExg32lMggWNMpfYs4W3RQgDDKSo8oo="; + url = "http://gondor.apana.org.au/~herbert/dash/files/dash-${finalAttrs.version}.tar.gz"; + hash = "sha256-akdKxG6LCzKRbExg32lMggWNMpfYs4W3RQgDDKSo8oo="; }; strictDeps = true; @@ -31,22 +31,23 @@ stdenv.mkDerivation rec { enableParallelBuilding = true; - meta = with lib; { - homepage = "http://gondor.apana.org.au/~herbert/dash/"; - description = "A POSIX-compliant implementation of /bin/sh that aims to be as small as possible"; - platforms = platforms.unix; - license = with licenses; [ bsd3 gpl2 ]; - }; - passthru = { shellPath = "/bin/dash"; tests = { - "execute-simple-command" = runCommand "${pname}-execute-simple-command" { } '' + "execute-simple-command" = runCommand "dash-execute-simple-command" { } '' mkdir $out - ${dash}/bin/dash -c 'echo "Hello World!" > $out/success' + ${lib.getExe dash} -c 'echo "Hello World!" > $out/success' [ -s $out/success ] grep -q "Hello World" $out/success ''; }; }; -} + + meta = with lib; { + homepage = "http://gondor.apana.org.au/~herbert/dash/"; + description = "A POSIX-compliant implementation of /bin/sh that aims to be as small as possible"; + platforms = platforms.unix; + license = with licenses; [ bsd3 gpl2 ]; + mainProgram = "dash"; + }; +}) |