Skip to content

Commit d885d3c

Browse files
Commit Nix lockfiles (#139)
* Commit Nix lockfiles This should allow users to build the package via import-from-derivation * Update crate2nix and lockfile * Update lockfiles * Update nixpkgs/crate2nix * Fix bitrotted Nix build of stackablectl * make regenerate-nix * update nixpkgs * make regenerate-nix --------- Co-authored-by: Nick Larsen <[email protected]>
1 parent 645a115 commit d885d3c

File tree

8 files changed

+13610
-32
lines changed

8 files changed

+13610
-32
lines changed

Cargo.nix

Lines changed: 13134 additions & 0 deletions
Large diffs are not rendered by default.

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ clean: chart-clean
7575

7676
regenerate-charts: chart-clean compile-chart
7777

78-
build: regenerate-charts helm-package docker-build
78+
regenerate-nix:
79+
nix run -f . regenerateNixLockfiles
80+
81+
build: regenerate-charts regenerate-nix helm-package docker-build
7982

8083
publish: build docker-publish helm-publish
8184

Tiltfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ operator_name = meta['operator']['name']
1010

1111
custom_build(
1212
registry + '/' + operator_name,
13-
'nix run -f . regenerateNixLockfiles && nix-build . -A docker --argstr dockerName "${EXPECTED_REGISTRY}/' + operator_name + '" && ./result/load-image | docker load',
13+
'make regenerate-nix && nix-build . -A docker --argstr dockerName "${EXPECTED_REGISTRY}/' + operator_name + '" && ./result/load-image | docker load',
1414
deps=[
1515
# Rust
1616
'rust', 'Cargo.toml', 'Cargo.lock', 'vendor',

crate-hashes.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"product-config 0.6.0 (git+https://github.com/stackabletech/product-config.git?tag=0.6.0#ad2c3ea6a291e415d978eb4271fb309e75861ef0)": "1ixc2x7540sxdmc92hqdcwm24rj8i1ivjsvwk2d57pdsq03j2x41",
3+
"stackable-operator 0.61.0 (git+https://github.com/stackabletech/operator-rs.git?tag=0.61.0#ddc57addbc741e3977b1589e553164505a59f639)": "1scwkw9gjd1gaijz8nxdpps88r85mxkxn5l2805m9g6cm6zbgvc0",
4+
"stackable-operator-derive 0.61.0 (git+https://github.com/stackabletech/operator-rs.git?tag=0.61.0#ddc57addbc741e3977b1589e553164505a59f639)": "1scwkw9gjd1gaijz8nxdpps88r85mxkxn5l2805m9g6cm6zbgvc0"
5+
}

default.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ rec {
3838
'';
3939
};
4040
helm-sys = attrs: {
41-
GO_HELM_WRAPPER = goHelmWrapper + "/bin/go-helm-wrapper";
41+
GO_HELM_WRAPPER = goHelmWrapper + "/bin";
42+
LIBCLANG_PATH = "${pkgs.libclang.lib}/lib";
43+
BINDGEN_EXTRA_CLANG_ARGS = "-I${pkgs.glibc.dev}/include -I${pkgs.clang.cc.lib}/lib/clang/${pkgs.lib.versions.major (pkgs.lib.getVersion pkgs.clang.cc)}/include";
4244
};
4345
};
4446
};
@@ -129,6 +131,13 @@ rec {
129131
pwd = ./rust/helm-sys/go-helm-wrapper;
130132
modules = ./gomod2nix.toml;
131133
ldflags = "-buildmode c-archive";
134+
allowGoReference = true;
135+
postBuild =
136+
''
137+
for pkg in $(getGoDirs ""); do
138+
buildFlags="-buildmode c-archive -o $GOPATH/bin/libgo-helm-wrapper.a" buildGoDir build "$pkg"
139+
done
140+
'';
132141
};
133142

134143
regenerateNixLockfiles = pkgs.writeScriptBin "regenerate-nix-lockfiles"

0 commit comments

Comments
 (0)