Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 37 lines 831 B view raw
1{ 2 lib, 3 fetchFromSourcehut, 4 rustPlatform, 5 nix-update-script, 6}: 7 8let 9 version = "0.5.4"; 10in 11rustPlatform.buildRustPackage { 12 pname = "sd-switch"; 13 inherit version; 14 15 src = fetchFromSourcehut { 16 owner = "~rycee"; 17 repo = "sd-switch"; 18 rev = version; 19 hash = "sha256-lP65PrMFhbNoWyObFsJK06Hgv9w83hyI/YiKcL5rXhY="; 20 }; 21 22 cargoHash = "sha256-sWYKJz/wfx0XG150cTOguvhdN3UEn8QE0P0+2lSeVkc="; 23 24 passthru = { 25 updateScript = nix-update-script { }; 26 }; 27 28 meta = { 29 description = "Systemd unit switcher for Home Manager"; 30 mainProgram = "sd-switch"; 31 homepage = "https://git.sr.ht/~rycee/sd-switch"; 32 changelog = "https://git.sr.ht/~rycee/sd-switch/refs/${version}"; 33 license = lib.licenses.gpl3Plus; 34 maintainers = with lib.maintainers; [ rycee ]; 35 platforms = lib.platforms.linux; 36 }; 37}