Skip to content

Commit d5d7bf5

Browse files
authored
fix(nix): Set nix setup (#18)
1 parent 2c59436 commit d5d7bf5

File tree

4 files changed

+22
-9
lines changed

4 files changed

+22
-9
lines changed

.github/workflows/nix.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "Test build nix"
2+
on:
3+
pull_request:
4+
push:
5+
jobs:
6+
tests:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: cachix/install-nix-action@v27
11+
with:
12+
github_access_token: ${{ secrets.GITHUB_TOKEN }}
13+
- run: nix build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ assets/*.ttf
33
assets/*.ttf:Zone.Identifier
44
assets/*.cast
55
/release
6+
/result
67
**/*.deb

default.nix

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
{pkgs ? import <nixpkgs> {}}:
2-
pkgs.rustPlatform.buildRustPackage rec {
2+
pkgs.rustPlatform.buildRustPackage {
33
pname = "nyaa";
4-
version = "0.9.0";
5-
6-
# src = fetchFromGitHub {
7-
# owner = "Beastwick18";
8-
# repo = "nyaa";
9-
# rev = "v${version}";
10-
# hash = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
11-
# };
4+
version =
5+
(builtins.fromTOML (
6+
builtins.readFile ./Cargo.toml
7+
))
8+
.package
9+
.version;
1210

1311
cargoLock.lockFile = ./Cargo.lock;
1412
src = pkgs.lib.cleanSource ./.;

flake.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
packages = forAllSystems (system: {
1515
default = pkgsFor.${system}.callPackage ./default.nix {};
1616
});
17+
1718
devShells = forAllSystems (system: {
1819
default = pkgsFor.${system}.callPackage ./shell.nix {};
1920
});

0 commit comments

Comments
 (0)