Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions pkgs/by-name/sh/shpool/package.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
linux-pam,
Expand All @@ -18,24 +19,22 @@ rustPlatform.buildRustPackage (finalAttrs: {
hash = "sha256-r1bYcf5SPHbrPgxCvfbZNVhGj/gX8K5ucd8PH0WMgb8=";
};

postPatch = ''
postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
substituteInPlace systemd/shpool.service \
--replace-fail '/usr/bin/shpool' "$out/bin/shpool"
'';

cargoHash = "sha256-BeMIasnEFqeoHhNAlj/uBMtMoZvrLjyWDKi0n8BaSnU=";

buildInputs = [
linux-pam
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ linux-pam ];

# The majority of tests rely on impure environment
# (such as systemd socket, ssh socket), and some of them
# have race conditions. They don't print their full name,
# tried skipping them but failed
doCheck = false;

postInstall = ''
postInstall = lib.optionalString stdenv.hostPlatform.isLinux ''
install -Dm444 systemd/shpool.service -t $out/lib/systemd/user
install -Dm444 systemd/shpool.socket -t $out/lib/systemd/user
'';
Expand All @@ -51,6 +50,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
license = lib.licenses.asl20;
mainProgram = "shpool";
maintainers = with lib.maintainers; [ aleksana ];
platforms = lib.platforms.linux;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
})
Loading