Fix nix build second attempt

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

@ -0,0 +1,10 @@
(import
(
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; }
).defaultNix

@ -1,21 +1,91 @@
{ {
"nodes": { "nodes": {
"flake-utils": { "flake-compat": {
"flake": false,
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1650374568,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "numtide", "owner": "edolstra",
"repo": "flake-utils", "repo": "flake-compat",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "edolstra",
"repo": "flake-utils", "repo": "flake-compat",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
"lastModified": 1633514407,
"narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=",
"owner": "kristapsdz",
"repo": "lowdown",
"rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8",
"type": "github"
},
"original": {
"owner": "kristapsdz",
"repo": "lowdown",
"type": "github"
}
},
"nix": {
"inputs": {
"lowdown-src": "lowdown-src",
"nixpkgs": "nixpkgs",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1667849540,
"narHash": "sha256-kqo8PTE3i21Z0pnxJwcwCQRZKKC15Y8xFTEN6qko3M8=",
"owner": "domenkozar",
"repo": "nix",
"rev": "3dcbdd412592413f34552a50403daf58656d43e6",
"type": "github"
},
"original": {
"owner": "domenkozar",
"ref": "relaxed-flakes",
"repo": "nix",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1657693803,
"narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "365e1b3a859281cf11b94f87231adeabbdd878a2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.05-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-regression": {
"locked": {
"lastModified": 1643052045,
"narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1668199800, "lastModified": 1668199800,
"narHash": "sha256-qnEeVo88H8an0Wds9kBSxWlGCa0vY5EgEswnQUZnXmc=", "narHash": "sha256-qnEeVo88H8an0Wds9kBSxWlGCa0vY5EgEswnQUZnXmc=",
@ -32,8 +102,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-compat": "flake-compat",
"nixpkgs": "nixpkgs" "nix": "nix",
"nixpkgs": "nixpkgs_2"
} }
} }
}, },

@ -2,25 +2,33 @@
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";
nix.url = "github:domenkozar/nix/relaxed-flakes";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
}; };
outputs = { self, nixpkgs, flake-utils }: outputs = { self, nixpkgs, nix, ... }:
flake-utils.lib.eachDefaultSystem let
(system: systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
let pkgs = nixpkgs.legacyPackages.${system}; in forAllSystems = f: builtins.listToAttrs (map (name: { inherit name; value = f name; }) systems);
rec { in
packages = flake-utils.lib.flattenTree { {
xplr = pkgs.rustPlatform.buildRustPackage rec { packages = forAllSystems (system:
name = "xplr"; let
src = ./.; pkgs = import nixpkgs { inherit system; };
cargoLock = { in
lockFile = ./Cargo.lock; {
}; xplr = pkgs.rustPlatform.buildRustPackage rec {
name = "xplr";
src = ./.;
cargoLock = {
lockFile = ./Cargo.lock;
}; };
}; };
defaultPackage = packages.xplr; });
} defaultPackage = forAllSystems (system: self.packages.${system}.xplr);
); };
} }

Loading…
Cancel
Save