package.nix (1105B)
1 { 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 bash, 6 dash, 7 ncurses, 8 scdoc, 9 }: 10 11 stdenv.mkDerivation (finalAttrs: { 12 pname = "libshell"; 13 version = "0.5.0"; 14 15 __structuredAttrs = true; 16 17 src = fetchFromGitHub { 18 owner = "legionus"; 19 repo = "libshell"; 20 tag = "v${finalAttrs.version}"; 21 hash = "sha256-Jl0JyC4StD0SBlDM2Ubjj42I7J55fIj15GMRhNxttwg="; 22 }; 23 24 nativeBuildInputs = [ scdoc ]; 25 26 postPatch = '' 27 substituteInPlace Makefile --replace-fail "/usr" "" 28 substituteInPlace utils/Makefile --replace-fail "/usr" "" 29 substituteInPlace utils/cgrep.in --replace-fail "/bin/ash" "${dash}/bin/dash" 30 substituteInPlace shell-terminfo --replace-fail "tput" "${ncurses}/bin/tput" 31 for f in shell-* ; do 32 substituteInPlace $f --replace-warn "/bin/sh" "${bash}/bin/sh" 33 done 34 ''; 35 36 makeFlags = [ "DESTDIR=$(out)" ]; 37 38 doCheck = false; 39 40 meta = { 41 description = "A library of shell functions"; 42 homepage = "https://github.com/legionus/libshell"; 43 license = lib.licenses.gpl2; 44 maintainers = [ lib.maintainers.sikmir ]; 45 platforms = lib.platforms.all; 46 }; 47 })
