88 pam ,
99 pandoc ,
1010 rustPlatform ,
11+ tzdata ,
1112} :
1213
13- rustPlatform . buildRustPackage rec {
14+ rustPlatform . buildRustPackage ( finalAttrs : {
1415 pname = "sudo-rs" ;
15- version = "0.2.5 " ;
16+ version = "0.2.6 " ;
1617
1718 src = fetchFromGitHub {
1819 owner = "trifectatechfoundation" ;
1920 repo = "sudo-rs" ;
20- rev = "v${ version } " ;
21- hash = "sha256-apvMcn/1dV9uujyoHikiOxregwWtAFPvrZvYjd3XQwM =" ;
21+ tag = "v${ finalAttrs . version } " ;
22+ hash = "sha256-vZv3IVSW6N0puoWJBYQPmNntgHPt9SPV07TEuWN/bHw =" ;
2223 } ;
2324 useFetchCargoVendor = true ;
24- cargoHash = "sha256-EAfNg7hUsynFZ+EcUqeD9o44BakBYIMgxRXc4vcl8HY =" ;
25+ cargoHash = "sha256-/CbU2ds2VQ2IXx7GKxRO3vePzLXJXabA1FcyIGPsngw =" ;
2526
2627 nativeBuildInputs = [
2728 installShellFiles
@@ -33,8 +34,11 @@ rustPlatform.buildRustPackage rec {
3334 # Don't attempt to generate the docs in a (pan)Docker container
3435 postPatch = ''
3536 substituteInPlace util/generate-docs.sh \
36- --replace "/usr/bin/env bash" ${ lib . getExe bash } \
37- --replace util/pandoc.sh pandoc
37+ --replace-fail "/usr/bin/env bash" ${ lib . getExe bash } \
38+ --replace-fail util/pandoc.sh pandoc
39+
40+ substituteInPlace build.rs \
41+ --replace-fail "/usr/share/zoneinfo" "${ tzdata } /share/zoneinfo"
3842 '' ;
3943
4044 postInstall = ''
@@ -75,16 +79,19 @@ rustPlatform.buildRustPackage rec {
7579 tests = nixosTests . sudo-rs ;
7680 } ;
7781
78- meta = with lib ; {
82+ meta = {
7983 description = "Memory safe implementation of sudo and su" ;
8084 homepage = "https://github.com/trifectatechfoundation/sudo-rs" ;
81- changelog = "${ meta . homepage } /blob/v${ version } /CHANGELOG.md" ;
82- license = with licenses ; [
85+ changelog = "${ finalAttrs . meta . homepage } /blob/v${ finalAttrs . version } /CHANGELOG.md" ;
86+ license = with lib . licenses ; [
8387 asl20
8488 mit
8589 ] ;
86- maintainers = with maintainers ; [ nicoo ] ;
90+ maintainers = with lib . maintainers ; [
91+ nicoo
92+ rvdp
93+ ] ;
8794 mainProgram = "sudo" ;
88- platforms = platforms . linux ;
95+ platforms = lib . platforms . linux ;
8996 } ;
90- }
97+ } )
0 commit comments