Fix nix build

pull/531/head
Arijit Basu 1 year ago
parent 69db7fa9e6
commit a0c19025dd
No known key found for this signature in database
GPG Key ID: 0F8EF5258DC38077

@ -3,16 +3,16 @@ on:
pull_request:
push:
jobs:
tests:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v11
with:
name: xplr
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix-build
- run: nix-shell --run "xplr --version"
- uses: actions/checkout@v3
- uses: nixbuild/nix-quick-install-action@v19
with:
nix_conf: experimental-features = nix-command flakes
- uses: cachix/cachix-action@v11
with:
name: xplr
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix-build
- run: nix-shell --run "xplr --version"

@ -1,5 +1,20 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1668199800,
@ -17,6 +32,7 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}

@ -2,20 +2,25 @@
description = "xplr - A hackable, minimal, fast TUI file explorer";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs";
};
outputs = { self, nixpkgs }:
{
packages.x86_64-linux.default =
with import nixpkgs { system = "x86_64-linux"; };
rustPlatform.buildRustPackage rec {
name = "xplr";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem
(system:
let pkgs = nixpkgs.legacyPackages.${system}; in
rec {
packages = flake-utils.lib.flattenTree {
xplr = pkgs.rustPlatform.buildRustPackage rec {
name = "xplr";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
};
};
};
};
};
defaultPackage = packages.xplr;
}
);
}

Loading…
Cancel
Save