Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nais/cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 31cb397614cbd64d502092f45765478460ce1da4
Choose a base ref
..
head repository: nais/cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a96a73a60ba42c48d3c88a01bd4a7594cca45679
Choose a head ref
Showing with 58 additions and 60 deletions.
  1. +3 −3 flake.lock
  2. +55 −57 flake.nix
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 55 additions & 57 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -3,63 +3,61 @@

inputs.nixpkgs.url = "nixpkgs/nixos-unstable";

outputs = {
self,
nixpkgs,
}: let
version = builtins.substring 0 8 (self.lastModifiedDate or self.lastModified or "19700101");
# goOverlay = final: prev: {
# go = prev.go.overrideAttrs (old: {
# version = "1.23.2";
# src = prev.fetchurl {
# url = "https://go.dev/dl/go1.23.2.src.tar.gz";
# hash = "sha256-NpMBYqk99BfZC9IsbhTa/0cFuqwrAkGO3aZxzfqc0H8=";
# };
# });
# };
withSystem = nixpkgs.lib.genAttrs [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
withPkgs = callback:
withSystem (
system:
callback (
import nixpkgs {
inherit system;
# overlays = [goOverlay];
}
)
);
in {
packages = withPkgs (pkgs: rec {
nais = pkgs.buildGoModule {
pname = "nais-cli";
inherit version;
src = ./.;
vendorHash = "sha256-WE5WSOOAUBEfxF/NAaVjTFBZeMRA3APmOJGbBueKObo=";
postInstall = ''
mv $out/bin/cli $out/bin/nais
'';
};
default = nais;
});
outputs = { self, nixpkgs, }:
let
version = builtins.substring 0 8
(self.lastModifiedDate or self.lastModified or "19700101");
withSystem = nixpkgs.lib.genAttrs [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
withPkgs = callback:
withSystem (system:
callback (import nixpkgs {
inherit system;
overlays = [
(final: prev: {
go = (prev.go.overrideAttrs {
version = "1.23.6";
src = prev.fetchurl {
url = "https://go.dev/dl/go1.23.6.src.tar.gz";
hash =
"sha256-A5xbBOZSedrO7opvcecL0Fz1uAF4K293xuGeLtBREiI=";
};
});
})
];
}));
in {
packages = withPkgs (pkgs: rec {
nais = pkgs.buildGoModule.override { go = pkgs.go; } {
pname = "nais-cli";
inherit version;
src = ./.;
vendorHash = "sha256-kr9VARylPRphfrBEf8KgY1mCV+a1lwQpT/lpur1T3tQ=";

devShells = withPkgs (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
go
gopls
gotools
go-tools
nodejs_20
nodePackages.prettier
];
};
});
postInstall = ''
mv $out/bin/cli $out/bin/nais
'';
};
default = nais;
});

formatter = withPkgs (pkgs: pkgs.nixfmt-rfc-style);
};
devShells = withPkgs (pkgs: {
default = pkgs.mkShell {
buildInputs = with pkgs; [
go
gopls
gotools
go-tools
nodejs_20
nodePackages.prettier
];
};
});

formatter = withPkgs (pkgs: pkgs.nixfmt-rfc-style);
};
}