File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
pkgs/by-name/co/countryfetch Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ rustPlatform ,
4+ fetchFromGitHub ,
5+ yq ,
6+ pkg-config ,
7+ openssl ,
8+ versionCheckHook ,
9+ nix-update-script ,
10+ } :
11+
12+ rustPlatform . buildRustPackage ( finalAttrs : {
13+ pname = "countryfetch" ;
14+ version = "0.1.9" ;
15+
16+ src = fetchFromGitHub {
17+ owner = "nik-rev" ;
18+ repo = "countryfetch" ;
19+ tag = "v${ finalAttrs . version } " ;
20+ hash = "sha256-KdFgY54vXLmq6IZfJzZ1IeZ2eQuNJoCRZUV3rVuPpcY=" ;
21+ } ;
22+
23+ postPatch = ''
24+ tomlq -ti '.dependencies.openssl.features[] |= select(.!="vendored")' countryfetch/Cargo.toml
25+ '' ;
26+
27+ useFetchCargoVendor = true ;
28+ cargoHash = "sha256-XJI9k/5hdak8p0/J/x9u6lqJu/DIbX93Wwm3LALkAAw=" ;
29+
30+ env . RUSTC_BOOTSTRAP = 1 ;
31+
32+ nativeBuildInputs = [
33+ pkg-config
34+ yq # for `tomlq`
35+ ] ;
36+
37+ buildInputs = [ openssl ] ;
38+
39+ cargoBuildFlags = [ "--package=countryfetch" ] ;
40+
41+ nativeInstallCheckInputs = [ versionCheckHook ] ;
42+ versionCheckProgramArg = "--version" ;
43+ doInstallCheck = true ;
44+
45+ passthru . updateScript = nix-update-script { } ;
46+
47+ meta = {
48+ description = "Command-line tool similar to Neofetch for obtaining information about your country" ;
49+ homepage = "https://github.com/nik-rev/countryfetch" ;
50+ changelog = "https://github.com/nik-rev/countryfetch/blob/v${ finalAttrs . version } /CHANGELOG.md" ;
51+ license = lib . licenses . mit ;
52+ maintainers = with lib . maintainers ; [ defelo ] ;
53+ mainProgram = "countryfetch" ;
54+ } ;
55+ } )
You can’t perform that action at this time.
0 commit comments