Merge branch 'main' into main

This commit is contained in:
Luc Perkins 2022-10-21 22:07:37 +02:00 committed by GitHub
commit 6e4bf2427c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 280 additions and 114 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.direnv/ .direnv/
target target
result

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -32,7 +32,7 @@
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ boot clojure leiningen ]; buildInputs = with pkgs; [ boot clojure leiningen ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ cue ]; buildInputs = with pkgs; [ cue ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -33,7 +33,7 @@
] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) (mkDhallTools [ "csv" "text" ]); # Linux only ] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) (mkDhallTools [ "csv" "text" ]); # Linux only
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = (with pkgs; [ dhall ]) ++ dhallTools; buildInputs = (with pkgs; [ dhall ]) ++ dhallTools;
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = (with pkgs; [ elixir ]) ++ buildInputs = (with pkgs; [ elixir ]) ++
pkgs.lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [ gigalixir inotify-tools libnotify ]) ++ # Linux only pkgs.lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [ gigalixir inotify-tools libnotify ]) ++ # Linux only
pkgs.lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [ terminal-notifier ]) ++ # macOS only pkgs.lib.optionals (pkgs.stdenv.isDarwin) (with pkgs; [ terminal-notifier ]) ++ # macOS only

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = (with pkgs.elmPackages; [ elm ]) ++ (with pkgs; [ elm2nix ]); buildInputs = (with pkgs.elmPackages; [ elm ]) ++ (with pkgs; [ elm2nix ]);
shellHook = with pkgs.elmPackages; '' shellHook = with pkgs.elmPackages; ''

View file

@ -9,7 +9,7 @@
outputs = { self, flake-utils, nixpkgs }: outputs = { self, flake-utils, nixpkgs }:
{ {
templates = { templates = rec {
clojure = { clojure = {
path = ./clojure; path = ./clojure;
description = "Clojure development environment"; description = "Clojure development environment";
@ -110,6 +110,11 @@
description = "Rust development environment"; description = "Rust development environment";
}; };
rust-toolchain = {
path = ./rust-toolchain;
description = "Rust development environment with Rust version defined by a rust-toolchain.toml file";
};
scala = { scala = {
path = ./scala; path = ./scala;
description = "Scala development environment"; description = "Scala development environment";
@ -119,6 +124,9 @@
path = ./zig; path = ./zig;
description = "Zig development environment"; description = "Zig development environment";
}; };
# Aliases
rt = rust-toolchain;
}; };
} // flake-utils.lib.eachDefaultSystem (system: } // flake-utils.lib.eachDefaultSystem (system:
let let
@ -130,19 +138,38 @@
${exec "nixpkgs-fmt"} **/*.nix ${exec "nixpkgs-fmt"} **/*.nix
''; '';
dvt = writeScriptBin "dvt" ''
if [ -z $1 ]; then
echo "no template specified"
exit 1
fi
TEMPLATE=$1
${exec "nix"} \
--experimental-features 'nix-command flakes' \
flake init \
--template \
"github:the-nix-way/dev-templates#''${TEMPLATE}"
'';
update = writeScriptBin "update" '' update = writeScriptBin "update" ''
for dir in `ls -d */`; do # Iterate through all the templates for dir in `ls -d */`; do # Iterate through all the templates
( (
cd $dir cd $dir
${exec "nix"} flake update # Update flake.lock ${exec "nix"} flake update # Update flake.lock
${ ${exec "direnv"} reload # Make sure things work after the update
exec "direnv"
} reload # Make sure things work after the update
) )
done done
''; '';
in in
{ {
devShells = { default = mkShell { buildInputs = [ format update ]; }; }; devShells = { default = mkShell { buildInputs = [ format update ]; }; };
packages = rec {
default = dvt;
inherit dvt;
};
}); });
} }

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ gleam ]; buildInputs = with pkgs; [ gleam ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -19,9 +19,9 @@
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShell = pkgs.mkShellNoCC { devShells.default = pkgs.mkShellNoCC {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
# go 1.17.1 (specified by overlay) # go 1.19 (specified by overlay)
go go
# goimports, godoc, etc. # goimports, godoc, etc.

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -18,7 +18,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
packer packer
terraform terraform

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ cabal-install ghc ]; buildInputs = with pkgs; [ cabal-install ghc ];
shellHook = with pkgs; '' shellHook = with pkgs; ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -31,7 +31,7 @@
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ gradle jdk maven ]; buildInputs = with pkgs; [ gradle jdk maven ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -31,7 +31,7 @@
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ kotlin gradle gcc ncurses patchelf zlib ]; buildInputs = with pkgs; [ kotlin gradle gcc ncurses patchelf zlib ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ nickel ]; buildInputs = with pkgs; [ nickel ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -1,2 +1 @@
use flake . use flake .
use flake .

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ buildInputs = with pkgs; [
cachix cachix
lorri lorri

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -24,7 +24,7 @@
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ node2nix nodejs pnpm yarn ]; buildInputs = with pkgs; [ node2nix nodejs pnpm yarn ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ ocaml ocamlformat ] ++ buildInputs = with pkgs; [ ocaml ocamlformat ] ++
(with pkgs.ocamlPackages; [ dune_3 odoc ]); (with pkgs.ocamlPackages; [ dune_3 odoc ]);

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ open-policy-agent conftest ]; buildInputs = with pkgs; [ open-policy-agent conftest ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -16,7 +16,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ buf protobuf ]; buildInputs = with pkgs; [ buf protobuf ];
shellHook = with pkgs; '' shellHook = with pkgs; ''

View file

@ -37,11 +37,11 @@
"pypi-deps-db": "pypi-deps-db" "pypi-deps-db": "pypi-deps-db"
}, },
"locked": { "locked": {
"lastModified": 1660767432, "lastModified": 1662635943,
"narHash": "sha256-aFZSd2aAO10IaVLCaff+oXsibm+m2BDlrxapEesW14E=", "narHash": "sha256-1OBBlBzZ894or8eHZjyADOMnGH89pPUKYGVVS5rwW/0=",
"owner": "DavHau", "owner": "DavHau",
"repo": "mach-nix", "repo": "mach-nix",
"rev": "b5614640bc3379408d90db9e375b47345fbc21eb", "rev": "65266b5cc867fec2cb6a25409dd7cd12251f6107",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -67,11 +67,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -83,11 +83,11 @@
"pypi-deps-db": { "pypi-deps-db": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1643877077, "lastModified": 1661155889,
"narHash": "sha256-jv8pIvRFTP919GybOxXE5TfOkrjTbdo9QiCO1TD3ZaY=", "narHash": "sha256-t00mBTZhmZBT4jteO6pJbU0wyRS6/ep4pKmQNeztEms=",
"owner": "DavHau", "owner": "DavHau",
"repo": "pypi-deps-db", "repo": "pypi-deps-db",
"rev": "da53397f0b782b0b18deb72ef8e0fb5aa7c98aa3", "rev": "49c620f3de2b557c9d5c44f58a00fee59f27d1b0",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -25,7 +25,7 @@
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ python machNix virtualenv ] ++ buildInputs = with pkgs; [ python machNix virtualenv ] ++
(with pkgs.python311Packages; [ pip ]); (with pkgs.python311Packages; [ pip ]);

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -21,7 +21,7 @@
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ ruby ]; buildInputs = with pkgs; [ ruby ];
shellHook = '' shellHook = ''

1
rust-toolchain/.envrc Normal file
View file

@ -0,0 +1 @@
use flake .

93
rust-toolchain/flake.lock Normal file
View file

@ -0,0 +1,93 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1665685160,
"narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1665296151,
"narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "14ccaaedd95a488dd7ae142757884d8e125b3363",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1665630024,
"narHash": "sha256-xXfneoHz4h4JR58leKFoHIIapAffWlOL9HI37vwuspo=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "73650741960a7422d1422f156f76211e576610c2",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

44
rust-toolchain/flake.nix Normal file
View file

@ -0,0 +1,44 @@
{
description = "A Nix-flake-based Rust development environment";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs =
{ self
, flake-utils
, nixpkgs
, rust-overlay
}:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
(import rust-overlay)
(self: super: {
rustToolchain = super.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
})
];
pkgs = import nixpkgs { inherit system overlays; };
in
{
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
rustToolchain
openssl
pkg-config
cargo-deny
cargo-edit
rust-analyzer
] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [ cargo-watch ]); # Currently broken on macOS
shellHook = ''
${pkgs.rustToolchain}/bin/cargo --version
'';
};
});
}

View file

@ -0,0 +1,2 @@
[toolchain]
channel = "1.64.0"

View file

@ -17,11 +17,11 @@
}, },
"flake-utils_2": { "flake-utils_2": {
"locked": { "locked": {
"lastModified": 1656928814, "lastModified": 1659877975,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -32,11 +32,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -47,11 +47,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1659102345, "lastModified": 1665296151,
"narHash": "sha256-Vbzlz254EMZvn28BhpN8JOi5EuKqnHZ3ujFYgFcSGvk=", "narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "11b60e4f80d87794a2a4a8a256391b37c59a1ea7", "rev": "14ccaaedd95a488dd7ae142757884d8e125b3363",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -74,11 +74,11 @@
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1661136859, "lastModified": 1665630024,
"narHash": "sha256-o3y1elFGRs/9kqaIeziAnTy9lIWA6VHtQfq0ARRVO2A=", "narHash": "sha256-xXfneoHz4h4JR58leKFoHIIapAffWlOL9HI37vwuspo=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "6d1418192be90968acfa25e7d7b089e246eb15c4", "rev": "73650741960a7422d1422f156f76211e576610c2",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -35,14 +35,13 @@
pkgs = import nixpkgs { inherit system overlays; }; pkgs = import nixpkgs { inherit system overlays; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ nativeBuildInputs = with pkgs; [
rustToolchain rustToolchain
openssl openssl
pkg-config pkg-config
cargo-audit
cargo-deny cargo-deny
cargo-cross cargo-edit
rust-analyzer rust-analyzer
] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [ cargo-watch ]); # Currently broken on macOS ] ++ pkgs.lib.optionals (pkgs.stdenv.isLinux) (with pkgs; [ cargo-watch ]); # Currently broken on macOS

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -31,7 +31,7 @@
pkgs = import nixpkgs { inherit overlays system; }; pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ scala sbt coursier ]; buildInputs = with pkgs; [ scala sbt coursier ];
shellHook = '' shellHook = ''

View file

@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1661178095, "lastModified": 1665685160,
"narHash": "sha256-VP8KoVbqHT7dihr8XES0fM1SmuOxQGyRP85MMDTSEf0=", "narHash": "sha256-MkNROnBdE9ocwuVrK5J/AF7zGUv6g4UhfdZ6GTrNEJA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d2a38cb03b8f5badfb70bfc2acb3151ed9609e38", "rev": "849a740bc1342a18ce69bb08f82227202d1f7109",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
pkgs = import nixpkgs { inherit system; }; pkgs = import nixpkgs { inherit system; };
in in
{ {
devShell = pkgs.mkShell { devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [ zig ]; buildInputs = with pkgs; [ zig ];
shellHook = '' shellHook = ''