Skip to content

Commit

Permalink
nix: use name/version from manifest and commit hash in version; use a…
Browse files Browse the repository at this point in the history
…llowBuiltinFetchGit so we don't have to manage hashes
  • Loading branch information
SpiralP committed Dec 26, 2024
1 parent 2df81b3 commit 77cddba
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
};

outputs = { nixpkgs, ... }:
outputs = { self, nixpkgs }:
let
inherit (nixpkgs) lib;

Expand Down Expand Up @@ -66,7 +66,7 @@

makeDefaultAttrs = (cef_binary: rec {
pname = rustManifest.package.name;
version = rustManifest.package.version;
version = "${rustManifest.package.version}-${self.shortRev or self.dirtyShortRev}";

src = lib.sourceByRegex ./. [
"^\.cargo(/.*)?$"
Expand All @@ -78,11 +78,7 @@

cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"async-dispatcher-0.1.0" = "sha256-GHKvmhHXvjSI2DZj+rdJugYcrNDkw8SGxRcNzGsF0VM=";
"clap-4.2.7" = "sha256-/nd/Wh6Ea3fM7Z4UUpQWFCJ9KtozND6DHUdwL/oLXmA=";
"classicube-helpers-3.0.0+classicube.1.3.7" = "sha256-3hWKS6NmAH0x+SOi/nBKJLIQi/3ilG7WSRrPvF++wGE=";
};
allowBuiltinFetchGit = true;
};

nativeBuildInputs = with pkgs; [
Expand Down

0 comments on commit 77cddba

Please sign in to comment.