Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenvNoCC, 4 dash, 5 scdoc, 6 fetchFromGitHub, 7}: 8stdenvNoCC.mkDerivation rec { 9 pname = "app2unit"; 10 version = "1.0.0"; 11 12 src = fetchFromGitHub { 13 owner = "Vladimir-csp"; 14 repo = "app2unit"; 15 tag = "v${version}"; 16 sha256 = "sha256-xHqPCA9ycPcImmyMrJZEfnfrFZ3sKfP/mhJ86CHLTQ8="; 17 }; 18 19 nativeBuildInputs = [ scdoc ]; 20 21 buildPhase = '' 22 scdoc < app2unit.1.scd > app2unit.1 23 ''; 24 25 installPhase = '' 26 install -Dt $out/bin app2unit 27 28 for link in \ 29 app2unit-open \ 30 app2unit-open-scope \ 31 app2unit-open-service \ 32 app2unit-term \ 33 app2unit-term-scope \ 34 app2unit-term-service 35 do 36 ln -s $out/bin/app2unit $out/bin/$link 37 done 38 ''; 39 40 dontPatchShebangs = true; 41 postFixup = '' 42 substituteInPlace $out/bin/app2unit \ 43 --replace-fail '#!/bin/sh' '#!${lib.getExe dash}' 44 ''; 45 46 meta = { 47 description = "Launches Desktop Entries as Systemd user units"; 48 homepage = "https://github.com/Vladimir-csp/app2unit"; 49 license = lib.licenses.gpl3; 50 mainProgram = "app2unit"; 51 maintainers = with lib.maintainers; [ fazzi ]; 52 platforms = lib.platforms.linux; 53 }; 54}