File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 11{
22 lib ,
3+ stdenv ,
34 rustPlatform ,
45 fetchFromGitHub ,
56 linux-pam ,
@@ -18,24 +19,22 @@ rustPlatform.buildRustPackage (finalAttrs: {
1819 hash = "sha256-r1bYcf5SPHbrPgxCvfbZNVhGj/gX8K5ucd8PH0WMgb8=" ;
1920 } ;
2021
21- postPatch = ''
22+ postPatch = lib . optionalString stdenv . hostPlatform . isLinux ''
2223 substituteInPlace systemd/shpool.service \
2324 --replace-fail '/usr/bin/shpool' "$out/bin/shpool"
2425 '' ;
2526
2627 cargoHash = "sha256-BeMIasnEFqeoHhNAlj/uBMtMoZvrLjyWDKi0n8BaSnU=" ;
2728
28- buildInputs = [
29- linux-pam
30- ] ;
29+ buildInputs = lib . optionals stdenv . hostPlatform . isLinux [ linux-pam ] ;
3130
3231 # The majority of tests rely on impure environment
3332 # (such as systemd socket, ssh socket), and some of them
3433 # have race conditions. They don't print their full name,
3534 # tried skipping them but failed
3635 doCheck = false ;
3736
38- postInstall = ''
37+ postInstall = lib . optionalString stdenv . hostPlatform . isLinux ''
3938 install -Dm444 systemd/shpool.service -t $out/lib/systemd/user
4039 install -Dm444 systemd/shpool.socket -t $out/lib/systemd/user
4140 '' ;
@@ -51,6 +50,6 @@ rustPlatform.buildRustPackage (finalAttrs: {
5150 license = lib . licenses . asl20 ;
5251 mainProgram = "shpool" ;
5352 maintainers = with lib . maintainers ; [ aleksana ] ;
54- platforms = lib . platforms . linux ;
53+ platforms = lib . platforms . linux ++ lib . platforms . darwin ;
5554 } ;
5655} )
You can’t perform that action at this time.
0 commit comments