Skip to content
Snippets Groups Projects
Commit 914d67a8 authored by Stephen D's avatar Stephen D
Browse files

nix packaging

parent 327f7418
Branches master
No related tags found
No related merge requests found
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1738023785,
"narHash": "sha256-BPHmb3fUwdHkonHyHi1+x89eXB3kA1jffIpwPVJIVys=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2b4230bf03deb33103947e2528cac2ed516c5c89",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
{
description = "Cargo wrapper that calls you a good girl if your commands succeed (but only after they fail)";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages = rec {
cargo-gg = pkgs.callPackage ./nix/package.nix { };
default = cargo-gg;
};
devShells.default = pkgs.mkShell {
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
inputsFrom = builtins.attrValues self.packages.${system};
nativeBuildInputs = [
pkgs.rustfmt
pkgs.clippy
];
};
}
);
}
{
lib,
rustPlatform,
protobuf,
}:
let
ignoredPaths = [
"nix"
"flake.nix"
"flake.lock"
];
in
rustPlatform.buildRustPackage {
pname = "cargo-gg";
version = "0.1.1";
src = lib.cleanSourceWith {
filter = name: _: !(builtins.elem (baseNameOf name) ignoredPaths);
src = lib.cleanSource ../.;
};
cargoLock.lockFile = ../Cargo.lock;
# skips rebuilding the whole thing with debug info
doCheck = false;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment