Skip to content
Snippets Groups Projects
Commit 2c51cdc2 authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

update nix flake for gitlab CI building docker images

parent 0e826765
No related branches found
No related tags found
No related merge requests found
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1705625727, "lastModified": 1705974079,
"narHash": "sha256-naMq6+TNLpEiBBjc0XaCbMLYJxJXWTZz4JGSpYGgIOM=", "narHash": "sha256-HyC3C2esW57j6bG0MKwX4kQi25ltslRnr6z2uvpadJo=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "8f515142e805dc377cf8edb0ff75d14a11307f89", "rev": "0b4e511fe6e346381e31d355e03de52aa43e8cb2",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1705731714, "lastModified": 1706077451,
"narHash": "sha256-aMeN/ASG4n7RIIPLiy+txoMdDTvIcaRDX6acbeeRtEU=", "narHash": "sha256-kd8Mlh+4NIG/NIkXeEwSIlwQuvysKJM4BeLrt2nvcc8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "712f25ec7e1f5839d486b246a5afa5e31f5df6ff", "rev": "77d5a2dd0b186c40953c435da6e0c2215d7e1dec",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -76,11 +76,11 @@ ...@@ -76,11 +76,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1705677747, "lastModified": 1705856552,
"narHash": "sha256-eyM3okYtMgYDgmYukoUzrmuoY4xl4FUujnsv/P6I/zI=", "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bbe7d8f876fbbe7c959c90ba2ae2852220573261", "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d",
"type": "github" "type": "github"
}, },
"original": { "original": {
...@@ -102,11 +102,11 @@ ...@@ -102,11 +102,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1705697225, "lastModified": 1705864945,
"narHash": "sha256-eLMwix3LPsgqnbdLMWivBCSBrWnaAA50JtMNnInTopg=", "narHash": "sha256-ZATChFWHToTZQFLlzrzDUX8fjEbMHHBIyPaZU1JGmjI=",
"owner": "rust-lang", "owner": "rust-lang",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "67cfbf231c1e2ba3129529de950d1c4ca7921404", "rev": "d410d4a2baf9e99b37b03dd42f06238b14374bf7",
"type": "github" "type": "github"
}, },
"original": { "original": {
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
]; ];
}; };
# Use mold on Linux
stdenv = if pkgs.stdenv.isLinux then stdenv = if pkgs.stdenv.isLinux then
pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv pkgs.stdenvAdapters.useMoldLinker pkgs.stdenv
else else
...@@ -95,12 +96,44 @@ ...@@ -95,12 +96,44 @@
in in
{ {
packages.default = builder { packages.default = builder {
src = ./.; src = nix-filter {
root = ./.;
include = [
"src"
"Cargo.toml"
"Cargo.lock"
];
};
# This is redundant with CI
doCheck = false;
inherit inherit
env env
nativeBuildInputs nativeBuildInputs
stdenv; stdenv;
meta.mainProgram = cargoToml.package.name;
};
packages.oci-image =
let
package = self.packages.${system}.default;
in
pkgs.dockerTools.buildImage {
name = package.pname;
tag = "latest";
config = {
# Use the `tini` init system so that signals (e.g. ctrl+c/SIGINT) are
# handled as expected
Entrypoint = [
"${pkgs.lib.getExe' pkgs.tini "tini"}"
"--"
];
Cmd = [
"${pkgs.lib.getExe package}"
];
};
}; };
devShells.default = (pkgs.mkShell.override { inherit stdenv; }) { devShells.default = (pkgs.mkShell.override { inherit stdenv; }) {
......
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