Skip to content

Commit

Permalink
fix: move nix files to dev folder
Browse files Browse the repository at this point in the history
Signed-off-by: isubasinghe <[email protected]>
  • Loading branch information
isubasinghe committed Jun 1, 2023
1 parent 0b0b2ed commit c505e80
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 16 deletions.
File renamed without changes.
File renamed without changes.
28 changes: 15 additions & 13 deletions nix-files/flake.nix → dev/nix/flake.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# NOTE: all dependencies changed here must also be changed in the Makefile.

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
Expand Down Expand Up @@ -35,7 +37,7 @@
inherit nodeEnv;
};
pythonPkgs = pkgs.python310Packages;
mkdocs = with pythonPkgs;
mkdocs = with pythonPkgs; # upgrade this in the Makefile if upgraded here
buildPythonPackage rec {
pname = "mkdocs";
version = "1.2.4";
Expand All @@ -57,7 +59,7 @@
];
doCheck = false;
};
mkdocs-material-extensions = with pythonPkgs;
mkdocs-material-extensions = with pythonPkgs; # upgrade this in the Makefile if upgraded here
buildPythonPackage rec {
pname = "mkdocs_material_extensions";
version = "1.1.1";
Expand All @@ -68,7 +70,7 @@
buildInputs = [ hatchling babel ];
format = "pyproject";
};
mkdocs-material = with pythonPkgs;
mkdocs-material = with pythonPkgs; # upgrade this in the Makefile if upgraded here
buildPythonPackage rec {
pname = "mkdocs-material";
version = "8.1.9";
Expand Down Expand Up @@ -110,7 +112,7 @@
propagatedBuildInputs = [ editdistpy ];
format = "pyproject";
};
mkdocs-spellcheck = with pythonPkgs;
mkdocs-spellcheck = with pythonPkgs; # upgrade this in the Makefile if upgraded here
buildPythonPackage rec {
pname = "mkdocs-spellcheck";
version = "0.2.1";
Expand Down Expand Up @@ -162,9 +164,9 @@
doCheck = false;
};

mockery = pkgs.buildGoModule rec {
mockery = pkgs.buildGoModule rec {
pname = "mockery";
version = "2.10.0";
version = "2.10.0"; # upgrade this in the Makefile if upgraded here

src = pkgs.fetchFromGitHub {
owner = "vektra";
Expand All @@ -178,7 +180,7 @@

protoc-gen-gogo-all = pkgs.buildGoModule rec {
pname = "protoc-gen-gogo";
version = "1.3.2";
version = "1.3.2"; # upgrade this in the Makefile if upgraded here

src = pkgs.fetchFromGitHub {
owner = "gogo";
Expand All @@ -191,7 +193,7 @@
};
grpc-ecosystem = pkgs.buildGoModule rec {
pname = "grpc-ecosystem";
version = "1.16.0";
version = "1.16.0"; # upgrade this in the Makefile if upgraded here

src = pkgs.fetchFromGitHub {
owner = "grpc-ecosystem";
Expand All @@ -205,7 +207,7 @@

go-swagger = pkgs.buildGoModule rec {
pname = "go-swagger";
version = "0.28.0";
version = "0.28.0"; # upgrade this in the Makefile if upgraded here

src = pkgs.fetchFromGitHub {
owner = "go-swagger";
Expand All @@ -219,7 +221,7 @@

controller-tools = pkgs.buildGoModule rec {
pname = "controller-tools";
version = "0.4.1";
version = "0.4.1"; # upgrade this in the Makefile if upgraded here

src = pkgs.fetchFromGitHub {
owner = "kubernetes-sigs";
Expand All @@ -233,7 +235,7 @@

k8sio-tools = pkgs.buildGoModule rec {
pname = "k8sio-tools";
version = "0.21.5";
version = "0.21.5"; # upgrade this in the Makefile if upgraded here

src = pkgs.fetchFromGitHub {
owner = "kubernetes";
Expand All @@ -247,7 +249,7 @@

goreman = pkgs.buildGoModule rec {
pname = "goreman";
version = "0.3.11";
version = "0.3.11"; # upgrade this in the Makefile if upgraded here
src = pkgs.fetchFromGitHub {
owner = "mattn";
repo = "goreman";
Expand All @@ -260,7 +262,7 @@

stern = pkgs.buildGoModule rec {
pname = "stern";
version = "1.25.0";
version = "1.25.0"; # upgrade this in the Makefile if upgraded here
src = pkgs.fetchFromGitHub {
owner = "stern";
repo = "stern";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 7 additions & 1 deletion docs/running-nix.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Here are the steps to follow:
1. Modify the hosts file according to [this](https://argoproj.github.io/argo-workflows/running-locally/), don't worry about the other instructions.
2. Set up a kubernetes cluster, k3d is the recommended solution here.
3. Install [Nix](https://nixos.org/download.html).
4. Run "nix develop --extra-experimental-features nix-command --extra-experimental-features flakes ./nix-files/ --impure" (you can add the extra features as a default in your nix.conf file).
4. Run "nix develop --extra-experimental-features nix-command --extra-experimental-features flakes ./dev/nix/ --impure" (you can add the extra features as a default in your nix.conf file).
5. Run "devenv up".

## Warning
Expand All @@ -31,3 +31,9 @@ and replace the existing hash value.

The almost exact same principles apply here, the only difference being you must change the `vendorHash` and the `sha256` fields.
The `vendorHash` is a hash of the vendored dependencies while the `sha256` is for the sources fetched from the `fetchFromGithub` call.

### Why am I getting a vendorSha256 mismatch ?
Unfortunately, dependabot is not capable of upgrading flakes automatically, when the go modules are automatically upgraded the
hash of the vendor dependencies changes but this change isn't automatically reflected in the nix file. The `vendorSha256` field that needs to
be upgraded can be found by searching for `${package.name} = pkgs.buildGoModule` in the nix file.

2 changes: 0 additions & 2 deletions nix-files/.gitignore

This file was deleted.

0 comments on commit c505e80

Please sign in to comment.