Skip to content

Commit 40cf4c9

Browse files
committed
fix(nix): use Flake for Nix sanity check
1 parent 96cca06 commit 40cf4c9

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ pkgs/npm/README.md src/README.md: README.md
2929

3030
.PHONY: test-nix
3131
test-nix:
32-
nix-shell --pure -E 'with import <nixpkgs> {}; mkShell { buildInputs = [ (import ./default.nix {}) ]; }' --run defang
32+
nix run .#defang-cli
33+

pkgs/defang/cli.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
2-
buildGoModule,
2+
buildGo124Module,
33
installShellFiles,
44
lib,
55
}:
6-
buildGoModule {
6+
buildGo124Module {
77
pname = "defang-cli";
88
version = "git";
9-
src = ../../src;
9+
src = lib.cleanSource ../../src;
1010
vendorHash = "sha256-m8xBhpKS6Tvoik2WZbkWgM52/FkCEhbdFNRwByi30zw="; # TODO: use fetchFromGitHub
1111

1212
subPackages = [ "cmd/cli" ];
@@ -33,5 +33,6 @@ buildGoModule {
3333
homepage = "https://defang.io/";
3434
license = licenses.mit;
3535
maintainers = with maintainers; [ lionello ];
36+
mainProgram = "defang";
3637
};
3738
}

0 commit comments

Comments
 (0)