File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
pkgs/by-name/ni/nix-forecast 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+ fetchFromGitHub ,
4+ installShellFiles ,
5+ makeBinaryWrapper ,
6+ nix ,
7+ rustPlatform ,
8+ versionCheckHook ,
9+ } :
10+
11+ rustPlatform . buildRustPackage rec {
12+ pname = "nix-forecast" ;
13+ version = "0.1.0" ;
14+
15+ src = fetchFromGitHub {
16+ owner = "getchoo" ;
17+ repo = "nix-forecast" ;
18+ rev = "refs/tags/v${ version } " ;
19+ hash = "sha256-jfS7DXEIVHihC0/kH9W8ZJDOjoWuxdRvLMfzknElvrg=" ;
20+ } ;
21+
22+ cargoHash = "sha256-EHqHdcMI1K7DqhmFfr0ipfAsyM7cP9/22bMs4uIV2To=" ;
23+
24+ nativeBuildInputs = [
25+ installShellFiles
26+ makeBinaryWrapper
27+ ] ;
28+
29+ doInstallCheck = true ;
30+ nativeInstallCheckInputs = [ versionCheckHook ] ;
31+
32+ # NOTE: Yes, we specifically need Nix. Lix does not have the newer
33+ # `path-info --json` output used internally
34+ postInstall = ''
35+ wrapProgram $out/bin/nix-forecast --prefix PATH : ${ lib . makeBinPath [ nix ] }
36+
37+ installShellCompletion --cmd nix-forecast \
38+ --bash completions/nix-forecast.bash \
39+ --fish completions/nix-forecast.fish \
40+ --zsh completions/_nix-forecast
41+ '' ;
42+
43+ env = {
44+ COMPLETION_DIR = "completions" ;
45+ } ;
46+
47+ meta = {
48+ description = "Check the forecast for today's Nix builds" ;
49+ homepage = "https://github.com/getchoo/nix-forecast" ;
50+ changelog = "https://github.com/getchoo/nix-forecast/releases/tag/${ version } " ;
51+ license = lib . licenses . mpl20 ;
52+ maintainers = with lib . maintainers ; [ getchoo ] ;
53+ mainProgram = "nix-forecast" ;
54+ } ;
55+ }
You can’t perform that action at this time.
0 commit comments