nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 56 lines 1.4 kB view raw
1{ 2 lib, 3 rustPlatform, 4 fetchFromGitHub, 5 linux-pam, 6 testers, 7 shpool, 8}: 9 10rustPlatform.buildRustPackage rec { 11 pname = "shpool"; 12 version = "0.8.0"; 13 14 src = fetchFromGitHub { 15 owner = "shell-pool"; 16 repo = "shpool"; 17 rev = "v${version}"; 18 hash = "sha256-pSSMC4pUtB38c6UNOj+Ma/Y1jcSfm33QV1B4tA/MyKY="; 19 }; 20 21 postPatch = '' 22 substituteInPlace systemd/shpool.service \ 23 --replace-fail '/usr/bin/shpool' "$out/bin/shpool" 24 ''; 25 26 cargoHash = "sha256-JDMgYd9mKsLdqc8rpDg3ymgFj/ntpBBF5fSDb2cLOJs="; 27 28 buildInputs = [ 29 linux-pam 30 ]; 31 32 # The majority of tests rely on impure environment 33 # (such as systemd socket, ssh socket), and some of them 34 # have race conditions. They don't print their full name, 35 # tried skipping them but failed 36 doCheck = false; 37 38 postInstall = '' 39 install -Dm444 systemd/shpool.service -t $out/lib/systemd/user 40 install -Dm444 systemd/shpool.socket -t $out/lib/systemd/user 41 ''; 42 43 passthru.tests.version = testers.testVersion { 44 command = "shpool version"; 45 package = shpool; 46 }; 47 48 meta = { 49 description = "Persistent session management like tmux, but more lightweight"; 50 homepage = "https://github.com/shell-pool/shpool"; 51 license = lib.licenses.asl20; 52 mainProgram = "shpool"; 53 maintainers = with lib.maintainers; [ aleksana ]; 54 platforms = lib.platforms.linux; 55 }; 56}