Skip to content

Commit 3c5b97f

Browse files
chore(nix): adds nightly pkg option
1 parent 308d2db commit 3c5b97f

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ nix-build-local: ## Build the nix derivation with the local toolchain
5151

5252
.PHONY: nix-build
5353
nix-build: ## Build the nix derivation with the nightly toolchain
54-
@nix build .#funzzy --verbose -L
54+
@nix build .# --verbose -L
5555

5656
.PHONY: nix-bump
5757
nix-bump:

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ nix profile install 'github:cristianoliveira/funzzy'
108108
nix profile install 'github:cristianoliveira/nixpkgs#funzzy'
109109
```
110110

111+
Install nightly version:
112+
```bash
113+
nix profile install 'github:cristianoliveira/funzzy#nightly'
114+
```
115+
111116
or, if you use `shell.nix`:
112117

113118
```nix

nix/package-nightly.nix

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{ lib , rustPlatform , fetchFromGitHub , stdenv , darwin }:
2+
3+
rustPlatform.buildRustPackage rec {
4+
pname = "funzzy";
5+
version = "master";
6+
7+
src = fetchFromGitHub {
8+
owner = "cristianoliveira";
9+
repo = "funzzy";
10+
rev = "${version}";
11+
hash = "sha256-NzO6vAyVQlocIXitZkLPd1b9IujbmOfzUA1AXlAJLrg=";
12+
};
13+
14+
cargoHash = "sha256-Rs0l7361BtuhV0DsMfeyKe/ryoCZaLWBnrpuVNeRKhU=";
15+
16+
# When installing from source only run unit tests
17+
checkPhase = ''
18+
cargo test $UNIT_TEST --lib
19+
'';
20+
21+
buildInputs = lib.optionals stdenv.isDarwin [
22+
darwin.apple_sdk.frameworks.CoreServices
23+
];
24+
25+
meta = with lib; {
26+
description = "A lightweight watcher";
27+
homepage = "https://github.com/cristianoliveira/funzzy";
28+
changelog = "https://github.com/cristianoliveira/funzzy/releases";
29+
license = licenses.mit;
30+
maintainers = with maintainers; [ cristianoliveira ];
31+
};
32+
}
33+

packages.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
{
33
default = pkgs.callPackage ./nix/package.nix { };
44
local = pkgs.callPackage ./nix/package-from-source.nix { };
5+
nightly = pkgs.callPackage ./nix/package-nightly.nix { };
56
}

0 commit comments

Comments
 (0)