build: I'm following GPT4 advice here, brace for hallucination bingo
All checks were successful
Build and push Docker image / build-and-publish (push) Successful in 11m8s

This commit is contained in:
Hamcha 2024-03-30 22:00:26 +01:00
parent 75260da0a8
commit 7b8c1247bb
2 changed files with 25 additions and 94 deletions

View file

@ -1,21 +1,5 @@
{ {
"nodes": { "nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
@ -52,56 +36,18 @@
"type": "github" "type": "github"
} }
}, },
"libgit2": {
"flake": false,
"locked": {
"lastModified": 1697646580,
"narHash": "sha256-oX4Z3S9WtJlwvj0uH9HlYcWv+x1hqp8mhXl7HsLu2f0=",
"owner": "libgit2",
"repo": "libgit2",
"rev": "45fd9ed7ae1a9b74b957ef4f337bc3c8b3df01b5",
"type": "github"
},
"original": {
"owner": "libgit2",
"repo": "libgit2",
"type": "github"
}
},
"nix": {
"inputs": {
"flake-compat": "flake-compat",
"libgit2": "libgit2",
"nixpkgs": "nixpkgs",
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1711812209,
"narHash": "sha256-3uijtGKH6tvQtXIhWzGojSVnoYvc0daAGA4LD0lV+Pc=",
"owner": "NixOS",
"repo": "nix",
"rev": "9b88e5284608116b7db0dbd3d5dd7a33b90d52d7",
"type": "github"
},
"original": {
"id": "nix",
"type": "indirect"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1709083642, "lastModified": 1701040486,
"narHash": "sha256-7kkJQd4rZ+vFrzWu8sTRtta5D1kBG0LSRYAfhtmMlSo=", "narHash": "sha256-vawYwoHA5CwvjfqaT3A5CT9V36Eq43gxdwpux32Qkjw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b550fe4b4776908ac2a861124307045f8e717c8e", "rev": "45827faa2132b8eade424f6bdd48d8828754341a",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "id": "nixpkgs",
"ref": "release-23.11", "type": "indirect"
"repo": "nixpkgs",
"type": "github"
} }
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
@ -122,37 +68,7 @@
"type": "github" "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": { "nixpkgs_2": {
"locked": {
"lastModified": 1701040486,
"narHash": "sha256-vawYwoHA5CwvjfqaT3A5CT9V36Eq43gxdwpux32Qkjw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "45827faa2132b8eade424f6bdd48d8828754341a",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1681358109, "lastModified": 1681358109,
"narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=",
@ -171,8 +87,7 @@
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nix": "nix", "nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"rust-crate2nix": "rust-crate2nix", "rust-crate2nix": "rust-crate2nix",
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
} }
@ -196,7 +111,7 @@
"rust-overlay": { "rust-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1701137803, "lastModified": 1701137803,

View file

@ -13,7 +13,6 @@
outputs = outputs =
inputs @ { self inputs @ { self
, nixpkgs , nixpkgs
, nix
, flake-parts , flake-parts
, rust-overlay , rust-overlay
, rust-crate2nix , rust-crate2nix
@ -51,10 +50,25 @@
{ {
inherit pkgs; inherit pkgs;
}; };
# Package with runtime dependencies and environment variable
wrappedPackage = pkgs.stdenv.mkDerivation {
name = "staxman";
buildInputs = [ pkgs.arion pkgs.docker-client pkgs.nix pkgs.makeWrapper ];
phases = [ "installPhase" ];
installPhase = ''
mkdir -p $out/bin
cp ${project.rootCrate.build}/bin/* $out/bin
wrapProgram $out/bin/staxman \
--set STAX_ARION_BIN "${pkgs.arion}/bin/arion" \
--prefix PATH : ${pkgs.lib.makeBinPath [ pkgs.arion pkgs.docker-client pkgs.nix ]}
'';
};
in in
rec { rec {
packages = { packages = {
staxman = project.rootCrate.build; staxman = wrappedPackage;
default = packages.staxman; default = packages.staxman;
}; };
@ -63,6 +77,8 @@
rustc rustc
cargo-watch cargo-watch
clang clang
arion
docker-client
]; ];
}; };
}; };