Merge pull request 'flake-compat: use nix-community fork' (#599) from flokli/garage:flake-compat into main
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #599
This commit is contained in:
commit
18eb73d52e
3 changed files with 26 additions and 22 deletions
20
flake.lock
20
flake.lock
|
@ -2,7 +2,9 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"cargo2nix": {
|
"cargo2nix": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": [
|
||||||
|
"flake-compat"
|
||||||
|
],
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -25,17 +27,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650374568,
|
"lastModified": 1688025799,
|
||||||
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
"narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=",
|
||||||
"owner": "edolstra",
|
"owner": "nix-community",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
"rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "edolstra",
|
"owner": "nix-community",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
@ -111,10 +112,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"cargo2nix": "cargo2nix",
|
"cargo2nix": "cargo2nix",
|
||||||
"flake-compat": [
|
"flake-compat": "flake-compat",
|
||||||
"cargo2nix",
|
|
||||||
"flake-compat"
|
|
||||||
],
|
|
||||||
"flake-utils": [
|
"flake-utils": [
|
||||||
"cargo2nix",
|
"cargo2nix",
|
||||||
"flake-utils"
|
"flake-utils"
|
||||||
|
|
|
@ -6,6 +6,8 @@
|
||||||
inputs.nixpkgs.url =
|
inputs.nixpkgs.url =
|
||||||
"github:NixOS/nixpkgs/94517a501434a627c5d9e72ac6e7f26174b978d3";
|
"github:NixOS/nixpkgs/94517a501434a627c5d9e72ac6e7f26174b978d3";
|
||||||
|
|
||||||
|
inputs.flake-compat.url = "github:nix-community/flake-compat";
|
||||||
|
|
||||||
inputs.cargo2nix = {
|
inputs.cargo2nix = {
|
||||||
# As of 2022-10-18: two small patches over unstable branch, one for clippy and one to fix feature detection
|
# As of 2022-10-18: two small patches over unstable branch, one for clippy and one to fix feature detection
|
||||||
url = "github:Alexis211/cargo2nix/a7a61179b66054904ef6a195d8da736eaaa06c36";
|
url = "github:Alexis211/cargo2nix/a7a61179b66054904ef6a195d8da736eaaa06c36";
|
||||||
|
@ -20,16 +22,17 @@
|
||||||
"github:oxalica/rust-overlay/74f1a64dd28faeeb85ef081f32cad2989850322c";
|
"github:oxalica/rust-overlay/74f1a64dd28faeeb85ef081f32cad2989850322c";
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.flake-compat.follows = "flake-compat";
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs.flake-utils.follows = "cargo2nix/flake-utils";
|
inputs.flake-utils.follows = "cargo2nix/flake-utils";
|
||||||
inputs.flake-compat.follows = "cargo2nix/flake-compat";
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs, cargo2nix, flake-utils, ... }:
|
outputs = { self, nixpkgs, cargo2nix, flake-utils, ... }:
|
||||||
let
|
let
|
||||||
git_version = self.lastModifiedDate;
|
git_version = self.lastModifiedDate;
|
||||||
compile = import ./nix/compile.nix;
|
compile = import ./nix/compile.nix;
|
||||||
in flake-utils.lib.eachDefaultSystem (system:
|
in
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let pkgs = nixpkgs.legacyPackages.${system};
|
let pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in {
|
in {
|
||||||
packages = {
|
packages = {
|
||||||
|
|
|
@ -1,14 +1,17 @@
|
||||||
let
|
let
|
||||||
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
||||||
flakeCompatRev = lock.nodes.flake-compat.locked.rev;
|
|
||||||
flakeCompat = fetchTarball {
|
inherit (lock.nodes.flake-compat.locked) owner repo rev narHash;
|
||||||
url =
|
|
||||||
"https://github.com/edolstra/flake-compat/archive/${flakeCompatRev}.tar.gz";
|
flake-compat = fetchTarball {
|
||||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
url = "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz";
|
||||||
|
sha256 = narHash;
|
||||||
};
|
};
|
||||||
flake = ((import flakeCompat) { src = ../.; }).defaultNix;
|
|
||||||
in rec {
|
flake = (import flake-compat { system = builtins.currentSystem; src = ../.; });
|
||||||
pkgsSrc = flake.inputs.nixpkgs;
|
in
|
||||||
cargo2nix = flake.inputs.cargo2nix;
|
rec {
|
||||||
|
pkgsSrc = flake.defaultNix.inputs.nixpkgs;
|
||||||
|
cargo2nix = flake.defaultNix.inputs.cargo2nix;
|
||||||
cargo2nixOverlay = cargo2nix.overlays.default;
|
cargo2nixOverlay = cargo2nix.overlays.default;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue