Fix nix build

pull/531/head
Arijit Basu 2 years 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: pull_request:
push: push:
jobs: jobs:
tests: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: cachix/install-nix-action@v17 - uses: nixbuild/nix-quick-install-action@v19
with: with:
nix_path: nixpkgs=channel:nixos-unstable nix_conf: experimental-features = nix-command flakes
- uses: cachix/cachix-action@v11 - uses: cachix/cachix-action@v11
with: with:
name: xplr name: xplr
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
- run: nix-build - run: nix-build
- run: nix-shell --run "xplr --version" - run: nix-shell --run "xplr --version"

@ -1,5 +1,20 @@
{ {
"nodes": { "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1668199800, "lastModified": 1668199800,
@ -17,6 +32,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
} }
} }

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

Loading…
Cancel
Save