Skip to content

Commit

Permalink
dev: dog-food devenv outputs
Browse files Browse the repository at this point in the history
It would've been great to dedupe the inputs by reading the flake, but that
naturally results in a loop because our patched nix picks up the
devenv.nix.
  • Loading branch information
sandydoo committed Nov 18, 2024
1 parent 206ac36 commit 75e5e52
Show file tree
Hide file tree
Showing 3 changed files with 141 additions and 21 deletions.
149 changes: 129 additions & 20 deletions devenv.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
{
"nodes": {
"cachix": {
"inputs": {
"devenv": [],
"flake-compat": "flake-compat",
"git-hooks": "git-hooks",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1728672398,
"owner": "cachix",
"repo": "cachix",
"rev": "aac51f698309fd0f381149214b7eee213c66ef0a",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "latest",
"repo": "cachix",
"type": "github"
}
},
"devenv": {
"locked": {
"dir": "src/modules",
"path": ".",
"path": "./src/modules",
"type": "path"
},
"original": {
"dir": "src/modules",
"path": ".",
"path": "./src/modules",
"type": "path"
},
"parent": []
Expand Down Expand Up @@ -43,6 +62,21 @@
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
Expand All @@ -65,18 +99,22 @@
},
"git-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-compat": [
"cachix",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"cachix",
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1730302582,
"lastModified": 1731363552,
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github"
},
"original": {
Expand All @@ -88,6 +126,7 @@
"gitignore": {
"inputs": {
"nixpkgs": [
"cachix",
"git-hooks",
"nixpkgs"
]
Expand All @@ -105,6 +144,26 @@
"type": "github"
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"libgit2": {
"flake": false,
"locked": {
Expand All @@ -125,7 +184,7 @@
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"libgit2": "libgit2",
"nixpkgs": "nixpkgs",
"nixpkgs": "nixpkgs_2",
"nixpkgs-23-11": "nixpkgs-23-11",
"nixpkgs-regression": "nixpkgs-regression",
"pre-commit-hooks": "pre-commit-hooks"
Expand All @@ -146,15 +205,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1730665687,
"lastModified": 1731676054,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "df9782b6077321330159a0ad8902d879f093d7c1",
"rev": "5e4fbfb6b3de1aa2872b76d49fafc942626e2add",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
Expand Down Expand Up @@ -191,10 +250,25 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1730327045,
"lastModified": 1731797254,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1731797254,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e8c38b73aeb218e27163376a2d617e61a2ad9b59",
"type": "github"
},
"original": {
Expand All @@ -205,6 +279,21 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1731954261,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad2c28c6c5cc04e09bed68db46db5718d40b5b9e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1716977621,
"owner": "cachix",
Expand Down Expand Up @@ -237,10 +326,32 @@
]
},
"locked": {
"lastModified": 1730302582,
"lastModified": 1731363552,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "af8a16fe5c264f5e9e18bcee2859b40a656876cf",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_3",
"gitignore": "gitignore_2",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1731363552,
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0",
"type": "github"
},
"original": {
Expand All @@ -251,13 +362,11 @@
},
"root": {
"inputs": {
"cachix": "cachix",
"devenv": "devenv",
"git-hooks": "git-hooks",
"nix": "nix",
"nixpkgs": "nixpkgs_2",
"pre-commit-hooks": [
"git-hooks"
]
"nixpkgs": "nixpkgs_3",
"pre-commit-hooks": "pre-commit-hooks_2"
}
}
},
Expand Down
6 changes: 6 additions & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
env.RUST_LOG_SPAN_EVENTS = "full";
env.DATABASE_URL = "sqlite:.devenv/nix-eval-cache.db";

cachix.pull = [ "cachix" ];

packages = [
pkgs.cairo
pkgs.git
Expand Down Expand Up @@ -38,6 +40,10 @@
devcontainer.settings.customizations.vscode.extensions = [ "jnoortheen.nix-ide" ];
difftastic.enable = true;

outputs = {
devenv = import ./package.nix { inherit inputs pkgs; };
};

processes = {
docs.exec = "mkdocs serve";
tailwind.exec = "watchexec -e html,css,js devenv-generate-doc-css";
Expand Down
7 changes: 6 additions & 1 deletion devenv.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# yaml-language-server: $schema=./docs/devenv.schema.json
inputs:
devenv:
url: path:.?dir=src/modules
url: path:./src/modules
nix:
url: github:domenkozar/nix/devenv-2.24
cachix:
url: github:cachix/cachix/latest
inputs:
devenv:
follows: ""

0 comments on commit 75e5e52

Please sign in to comment.