Skip to content

Commit d1c97ea

Browse files
authored
Run the binaries with Nix. (#326)
### What It can be pretty useful to run `nix run` and get a binary running which has been built in the exact same way as the production binary shipped in the Docker image. I also added the CLI so we can run `nix run .#cli`. ### How Bit of typing, really.
1 parent 1c8e203 commit d1c97ea

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

flake.nix

+14
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@
7575
};
7676
};
7777

78+
apps = {
79+
default = self.apps.${localSystem}.connector;
80+
81+
connector = {
82+
type = "app";
83+
program = "${self.packages.${localSystem}.default}/bin/ndc-postgres";
84+
};
85+
86+
cli = {
87+
type = "app";
88+
program = "${self.packages.${localSystem}.default}/bin/ndc-postgres-cli";
89+
};
90+
};
91+
7892
checks = {
7993
# Build the crate as part of `nix flake check`
8094
ndc-postgres = self.packages.${localSystem}.default;

nix/app.nix

-1
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,4 @@ craneLib.buildPackage
5353
(buildArgs // {
5454
inherit cargoArtifacts;
5555
doCheck = false;
56-
cargoExtraArgs = "--locked --bin ${buildArgs.pname}";
5756
})

0 commit comments

Comments
 (0)