nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 62 lines 1.3 kB view raw
1{ 2 lib, 3 stdenvNoCC, 4 dash, 5 scdoc, 6 fetchFromGitHub, 7 nix-update-script, 8 installShellFiles, 9}: 10stdenvNoCC.mkDerivation (finalAttrs: { 11 pname = "app2unit"; 12 version = "1.2.1"; 13 14 src = fetchFromGitHub { 15 owner = "Vladimir-csp"; 16 repo = "app2unit"; 17 tag = "v${finalAttrs.version}"; 18 sha256 = "sha256-DZ0W7SygOUmjIO0+K8hS9K1U+gSp1gA6Q15eXr6rOmo="; 19 }; 20 21 passthru.updateScript = nix-update-script { }; 22 23 nativeBuildInputs = [ 24 scdoc 25 installShellFiles 26 ]; 27 28 buildPhase = '' 29 scdoc < app2unit.1.scd > app2unit.1 30 ''; 31 32 installPhase = '' 33 install -Dt $out/bin app2unit 34 installManPage app2unit.1 35 36 for link in \ 37 app2unit-open \ 38 app2unit-open-scope \ 39 app2unit-open-service \ 40 app2unit-term \ 41 app2unit-term-scope \ 42 app2unit-term-service 43 do 44 ln -s $out/bin/app2unit $out/bin/$link 45 done 46 ''; 47 48 dontPatchShebangs = true; 49 postFixup = '' 50 substituteInPlace $out/bin/app2unit \ 51 --replace-fail '#!/bin/sh' '#!${lib.getExe dash}' 52 ''; 53 54 meta = { 55 description = "Launches Desktop Entries as Systemd user units"; 56 homepage = "https://github.com/Vladimir-csp/app2unit"; 57 license = lib.licenses.gpl3; 58 mainProgram = "app2unit"; 59 maintainers = with lib.maintainers; [ fazzi ]; 60 platforms = lib.platforms.linux; 61 }; 62})