diff --git a/flake.lock b/flake.lock index ff207a8..40e347f 100644 --- a/flake.lock +++ b/flake.lock @@ -16,16 +16,31 @@ "type": "github" } }, + "mozillapkgs": { + "locked": { + "lastModified": 1650459918, + "narHash": "sha256-sroCK+QJTmoXtcRkwZyKOP9iAYOPID2Bwdxn4GkG16w=", + "owner": "mozilla", + "repo": "nixpkgs-mozilla", + "rev": "e1f7540fc0a8b989fb8cf701dc4fd7fc76bcf168", + "type": "github" + }, + "original": { + "owner": "mozilla", + "repo": "nixpkgs-mozilla", + "type": "github" + } + }, "naersk": { "inputs": { "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1651574473, - "narHash": "sha256-wQhFORvRjo8LB2hTmETmv6cbyKGDPbfWqvZ/0chnDE4=", + "lastModified": 1653413650, + "narHash": "sha256-wojDHjb+eU80MPH+3HQaK0liUy8EgR95rvmCl24i58Y=", "owner": "nix-community", "repo": "naersk", - "rev": "f21309b38e1da0d61b881b6b6d41b81c1aed4e1d", + "rev": "69daaceebe12c070cd5ae69ba38f277bbf033695", "type": "github" }, "original": { @@ -63,6 +78,7 @@ "root": { "inputs": { "flake-compat": "flake-compat", + "mozillapkgs": "mozillapkgs", "naersk": "naersk", "nixpkgs": "nixpkgs_2", "utils": "utils" @@ -70,11 +86,11 @@ }, "utils": { "locked": { - "lastModified": 1652557277, - "narHash": "sha256-jSes9DaIVMdmwBB78KkFUVrlDzawmD62vrUg0GS2500=", + "lastModified": 1652776076, + "narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=", "owner": "numtide", "repo": "flake-utils", - "rev": "12806d31a381e7cd169a6bac35590e7b36dc5fe5", + "rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b0648e6..0511b0f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,17 +3,30 @@ nixpkgs.url = "nixpkgs"; utils.url = "github:numtide/flake-utils"; naersk.url = "github:nix-community/naersk"; + mozillapkgs.url = "github:mozilla/nixpkgs-mozilla"; flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; }; - outputs = { self, nixpkgs, utils, naersk, ... }: + outputs = { self, nixpkgs, utils, naersk, mozillapkgs, ... }: utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; - naersk-lib = naersk.lib."${system}"; + + # Get a specific rust version + mozilla = pkgs.callPackage (mozillapkgs + "/package-set.nix") { }; + rust = (mozilla.rustChannelOf { + date = "2022-05-19"; + channel = "stable"; + sha256 = "oro0HsosbLRAuZx68xd0zfgPl6efNj2AQruKRq3KA2g="; + }).rust; + + naersk-lib = naersk.lib."${system}".override { + cargo = rust; + rustc = rust; + }; in rec { packages.zerostash = naersk-lib.buildPackage { @@ -25,7 +38,7 @@ }; name = "zerostash"; - version = "0.3.0"; + version = "0.4.0"; src = ./.; root = ./.;