diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..8132cf8 --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,14 @@ +on: + pull_request: + push: + branches: [main] + +jobs: + check: + runs-on: "ubuntu-22.04" + steps: + - uses: "actions/checkout@v4" + - uses: "DeterminateSystems/nix-installer-action@main" + - uses: "DeterminateSystems/magic-nix-cache-action@main" + - name: Flake check + run: nix develop --command check diff --git a/.github/workflows/flakehub-publish-tagged.yml b/.github/workflows/flakehub-publish-tagged.yml index 1df8189..6203fbf 100644 --- a/.github/workflows/flakehub-publish-tagged.yml +++ b/.github/workflows/flakehub-publish-tagged.yml @@ -5,13 +5,14 @@ on: jobs: publish: - runs-on: "ubuntu-latest" + runs-on: "ubuntu-22.04" permissions: id-token: "write" contents: "read" steps: - - uses: "actions/checkout@v3" + - uses: "actions/checkout@v4" - uses: "DeterminateSystems/nix-installer-action@main" + - uses: "DeterminateSystems/magic-nix-cache-action@main" - uses: "DeterminateSystems/flakehub-push@main" with: visibility: "public" diff --git a/README.md b/README.md index 35a0d90..305f0ae 100644 --- a/README.md +++ b/README.md @@ -29,12 +29,15 @@ Once your preferred template has been initialized, you can use the provided shel | Language/framework/tool | Template | | :----------------------- | :---------------------------- | +| [Bun] | [`bun`](./bun/) | +| [C]/[C++] | [`c-cpp`](./c-cpp/) | | [Clojure] | [`clojure`](./clojure/) | | [C#][csharp] | [`csharp`](./csharp/) | | [Cue] | [`cue`](./cue/) | | [Dhall] | [`dhall`](./dhall/) | | [Elixir] | [`elixir`](./elixir/) | | [Elm] | [`elm`](./elm/) | +| Empty (change at will) | [`empty`](./empty) | | [Gleam] | [`gleam`](./gleam/) | | [Go] | [`go`](./go/) | | [Hashicorp] tools | [`hashi`](./hashi/) | @@ -52,16 +55,36 @@ Once your preferred template has been initialized, you can use the provided shel | [Protobuf] | [`protobuf`](./protobuf/) | | [Pulumi] | [`pulumi`](./pulumi/) | | [Purescript] | [`purescript`](./purescript/) | +| [R] | [`r`](./r/) | | [Ruby] | [`ruby`](./ruby/) | | [Rust] | [`rust`](./rust/) | | [Scala] | [`scala`](./scala/) | | [Shell] | [`shell`](./shell/) | +| [Vlang] | [`vlang`](./vlang/) | | [Zig] | [`zig`](./zig/) | ## Template contents The sections below list what each template includes. In all cases, you're free to add and remove packages as you see fit; the templates are just boilerplate. +### [`bun`](./bun/) + +- [bun] 1.1.8 + +### [`c-cpp`](./c-cpp/) + +- [clang-tools] 17.0.6 +- [cmake] 3.28.3 +- [codespell] 2.2.6 +- [conan] 2.0.17 +- [cppcheck] 2.13.4 +- [doxygen] 1.10.0 +- [gdb] 14.1 +- [gtest] 1.12.1 +- [lcov] 1.0 +- [vcpkg] +- [vcpkg-tool] + ### [`clojure`](./clojure/) - [Clojure] 1.11.1.1347 @@ -102,6 +125,10 @@ The sections below list what each template includes. In all cases, you're free t - [Elm] 0.19.1 - [elm2nix] +### [Empty](./empty/) + +A dev template that's fully customizable. + ### [`gleam`](./gleam/) - [Gleam] 0.30.0 @@ -139,6 +166,7 @@ The sections below list what each template includes. In all cases, you're free t - [Java] 20.0.1+9 - [Maven] 3.9.2 - [Gradle] 9.0.1 +- [jdtls] 1.31.0 ### [`kotlin`](./kotlin/) @@ -221,7 +249,12 @@ The sections below list what each template includes. In all cases, you're free t - [Python] 3.11.4 - [pip] 23.0.1 -- [Virtualenv] 20.19.0 + +### [`r`](./r/) + +- [R] 4.3.1 +- [rmarkdown] 2.22 +- [knitr] 1.43 ([pandoc] and [texlive]) ### [`ruby`](./ruby/) @@ -233,11 +266,11 @@ The sections below list what each template includes. In all cases, you're free t - From the `rust-toolchain.toml` file if present - From the `rust-toolchain` file if present - - Version 1.70.0 if neither is present + - Version 1.78.0 if neither is present -- [rust-analyzer] 2023-07-10 -- [cargo-audit] 0.17.0 -- [cargo-deny] 0.12.1 +- [rust-analyzer] 2024-04-29 +- [cargo-edit] 0.12.2 +- [cargo-deny] 0.14.23 ### [`scala`](./scala/) @@ -248,6 +281,10 @@ The sections below list what each template includes. In all cases, you're free t - [shellcheck] 0.9.0 +### [`Vlang`](./vlang/) + +- [Vlang] 0.4.4 + ### [`zig`](./zig/) - [Zig] 0.10.1 @@ -258,15 +295,23 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [boot]: https://www.boot-clj.com [buf]: https://github.com/bufbuild/buf +[bun]: https://bun.sh/ +[C]: https://www.open-std.org/jtc1/sc22/wg14 +[C++]: https://isocpp.org [cabal]: https://www.haskell.org/cabal [cachix]: https://www.cachix.org [cargo]: https://doc.rust-lang.org/cargo [cargo-audit]: https://crates.io/crates/cargo-audit [cargo-deny]: https://crates.io/crates/cargo-deny +[clang-tools]: https://clang.llvm.org/ [clippy]: https://github.com/rust-lang/rust-clippy [clojure]: https://clojure.org +[cmake]: https://cmake.org/ +[codespell]: https://github.com/codespell-project/codespell [composer]: https://getcomposer.org/ +[conan]: https://conan.io/ [conftest]: https://www.conftest.dev +[cppcheck]: http://cppcheck.sourceforge.net/ [csharp]: https://dotnet.microsoft.com/en-us/languages/csharp [cue]: https://cuelang.org [damon]: https://github.com/hashicorp/damon @@ -282,11 +327,13 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [dhall-toml]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-toml [dhall-yaml]: https://github.com/dhall-lang/dhall-haskell/tree/master/dhall-yaml [dotnet]: https://dotnet.microsoft.com/en-us/ +[doxygen]: https://www.doxygen.nl/ [dune]: https://dune.build [elixir]: https://elixir-lang.org [elm]: https://elm-lang.org [elm2nix]: https://github.com/cachix/elm2nix [flake-utils]: https://github.com/numtide/flake-utils +[gdb]: https://www.gnu.org/software/gdb/ [gigalixir]: https://www.gigalixir.com [gleam]: https://gleam.run [go]: https://go.dev @@ -294,14 +341,18 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [goimports]: https://pkg.go.dev/golang.org/x/tools/cmd/goimports [golangci-lint]: https://github.com/golangci/golangci-lint [gradle]: https://gradle.org +[gtest]: https://github.com/google/googletest [hashicorp]: https://hashicorp.com [haskell]: https://haskell.org [haxe]: https://haxe.org/ [iex]: https://hexdocs.pm/iex/IEx.html [java]: https://java.com +[jdtls]: https://projects.eclipse.org/projects/eclipse.jdt.ls [jq]: https://jqlang.github.io/jq +[knitr]: https://yihui.org/knitr/ [kotlin]: https://kotlinlang.org [latex]: https://www.latex-project.org/ +[lcov]: https://ltp.sourceforge.net/coverage/lcov.php [leiningen]: https://leiningen.org [levant]: https://github.com/hashicorp/levant [lorri]: https://github.com/target/lorri @@ -328,6 +379,7 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [odoc]: https://github.com/ocaml/odoc [omnisharp-roslyn]: https://github.com/OmniSharp/omnisharp-roslyn [opa]: https://openpolicyagent.org +[pandoc]: https://pandoc.org/ [packer]: https://packer.io [pip]: https://pypi.org/project/pip [phoenix]: https://phoenixframework.org @@ -339,7 +391,9 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [purescript-language-server]: https://github.com/nwolverson/purescript-language-server [purs-tidy]: https://github.com/natefaubion/purescript-tidy [python]: https://python.org +[r]: https://www.r-project.org/ [release]: https://github.com/NixOS/nixpkgs/releases/tag/22.11 +[rmarkdown]: https://rmarkdown.rstudio.com/ [ruby]: https://ruby-lang.org [rust]: https://rust-lang.org [rust-analyzer]: https://rust-analyzer.github.io @@ -355,7 +409,9 @@ All of the templates have only the root [flake](./flake.nix) as a flake input. T [texlive]: https://www.tug.org/texlive/ [tflint]: https://github.com/terraform-linters/tflint [vault]: https://www.vaultproject.io -[virtualenv]: https://pypi.org/project/virtualenv +[vcpkg]: https://vcpkg.io/ +[vcpkg-tool]: https://github.com/microsoft/vcpkg-tool [vulnix]: https://github.com/flyingcircusio/vulnix [yarn]: https://yarnpkg.com +[vlang]: https://vlang.io/ [zig]: https://ziglang.org diff --git a/bun/.envrc b/bun/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/bun/.envrc @@ -0,0 +1 @@ +use flake diff --git a/bun/flake.lock b/bun/flake.lock new file mode 100644 index 0000000..b5acb97 --- /dev/null +++ b/bun/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1715787315, + "narHash": "sha256-cYApT0NXJfqBkKcci7D9Kr4CBYZKOQKDYA23q8XNuWg=", + "rev": "33d1e753c82ffc557b4a585c77de43d4c922ebb5", + "revCount": 626834, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.626834%2Brev-33d1e753c82ffc557b4a585c77de43d4c922ebb5/018f8037-433d-77f3-b4bb-e542e48f7fd6/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/bun/flake.nix b/bun/flake.nix new file mode 100644 index 0000000..53b46e4 --- /dev/null +++ b/bun/flake.nix @@ -0,0 +1,25 @@ +{ + description = "A Nix-flake-based Bun development environment"; + + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; + + outputs = { self, nixpkgs }: + let + overlays = [ + (final: prev: rec { + bun = prev.bun; + }) + ]; + supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit overlays system; }; + }); + in + { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; [ bun ]; + }; + }); + }; +} diff --git a/c-cpp/.envrc b/c-cpp/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/c-cpp/.envrc @@ -0,0 +1 @@ +use flake diff --git a/c-cpp/flake.lock b/c-cpp/flake.lock new file mode 100644 index 0000000..863caf5 --- /dev/null +++ b/c-cpp/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1711001935, + "narHash": "sha256-URtGpHue7HHZK0mrHnSf8wJ6OmMKYSsoLmJybrOLFSQ=", + "rev": "20f77aa09916374aa3141cbc605c955626762c9a", + "revCount": 600876, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.600876%2Brev-20f77aa09916374aa3141cbc605c955626762c9a/018e65e3-9c1d-74a8-acde-67868b074670/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/c-cpp/flake.nix b/c-cpp/flake.nix new file mode 100644 index 0000000..15e740a --- /dev/null +++ b/c-cpp/flake.nix @@ -0,0 +1,36 @@ +{ + description = "A Nix-flake-based C/C++ development environment"; + + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; + + outputs = { self, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in + { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell.override { + # Override stdenv in order to change compiler: + # stdenv = pkgs.clangStdenv; + } + { + packages = with pkgs; [ + clang-tools + cmake + codespell + conan + cppcheck + doxygen + gtest + lcov + vcpkg + vcpkg-tool + ] ++ (if system == "aarch64-darwin" then [ ] else [ gdb ]); + }; + }); + }; +} + diff --git a/clojure/flake.lock b/clojure/flake.lock index d4ecad3..1cbfc64 100644 --- a/clojure/flake.lock +++ b/clojure/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/csharp/flake.lock b/csharp/flake.lock index d4ecad3..1cbfc64 100644 --- a/csharp/flake.lock +++ b/csharp/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/cue/flake.lock b/cue/flake.lock index d4ecad3..1cbfc64 100644 --- a/cue/flake.lock +++ b/cue/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/dhall/flake.lock b/dhall/flake.lock index d4ecad3..1cbfc64 100644 --- a/dhall/flake.lock +++ b/dhall/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/elixir/flake.lock b/elixir/flake.lock index 7a0cc8f..f694c77 100644 --- a/elixir/flake.lock +++ b/elixir/flake.lock @@ -20,12 +20,12 @@ }, "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1719075281, + "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", + "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", + "revCount": 642660, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.642660%2Brev-a71e967ef3694799d0c418c98332f7ff4cc5f6af/0190462b-ab23-7472-8ae7-ae4f8bde47d9/source.tar.gz" }, "original": { "type": "tarball", diff --git a/elixir/flake.nix b/elixir/flake.nix index 912e459..6b248cd 100644 --- a/elixir/flake.nix +++ b/elixir/flake.nix @@ -10,70 +10,91 @@ }; }; - outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachDefaultSystem (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - - # documentation - # https://nixos.org/manual/nixpkgs/stable/#sec-beam - - # ==== ERLANG ==== - - # use whatever version is currently defined in nixpkgs - erlang = pkgs.beam.interpreters.erlang; - - # use latest version of Erlang 26 - # erlang = pkgs.beam.interpreters.erlang_26; - - # specify exact version of Erlang OTP - # erlang = pkgs.beam.interpreters.erlang.override { - # version = "26.2.2"; - # sha256 = "sha256-7S+mC4pDcbXyhW2r5y8+VcX9JQXq5iEUJZiFmgVMPZ0="; - # } - - # ==== BEAM packages ==== - - # all BEAM packages will be compile with your preffered erlang version - pkgs-beam = pkgs.beam.packagesWith erlang; - - # ==== Elixir ==== - - # use whatever version is currently defined in nixpkgs - elixir = pkgs-beam.elixir; - - # use latest version of Elixir 1.16 - # elixir = pkgs-beam.elixir_1_16; - - # specify exact version of Elixir - # elixir = pkgs-beam.elixir.override { - # version = "1.16.1"; - # sha256 = "sha256-rjUt3gCUszCbzGE7BriwH3ptrV81dqNB/d0nVOXrcGI="; - # }; - in - { - devShells.default = pkgs.mkShell { - packages = [ - # use the Elixr/OTP versions defined above; will also install OTP, mix, hex, rebar3 - elixir - - # mix needs it for downloading dependencies - pkgs.git - - # probably needed for your Phoenix assets - pkgs.nodejs_20 - ] ++ - # Linux only - pkgs.lib.optionals pkgs.stdenv.isLinux (with pkgs; [ gigalixir inotify-tools libnotify ]) ++ - # macOS only - pkgs.lib.optionals pkgs.stdenv.isDarwin (with pkgs.darwin.apple_sdk.frameworks; [ pkgs.terminal-notifier CoreFoundation CoreServices ]); - - # some sane defaults for iex session - shellHooks = '' - export ERL_AFLAGS="+pc unicode -kernel shell_history enabled" - export ELIXIR_ERL_OPTIONS="+sssdio 128" - ''; - }; - } - ); + outputs = + { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + + # documentation + # https://nixos.org/manual/nixpkgs/stable/#sec-beam + + # ==== ERLANG ==== + + # use whatever version is currently defined in nixpkgs + # erlang = pkgs.beam.interpreters.erlang; + + # use latest version of Erlang 27 + erlang = pkgs.beam.interpreters.erlang_27; + + # specify exact version of Erlang OTP + # erlang = pkgs.beam.interpreters.erlang.override { + # version = "26.2.2"; + # sha256 = "sha256-7S+mC4pDcbXyhW2r5y8+VcX9JQXq5iEUJZiFmgVMPZ0="; + # } + + # ==== BEAM packages ==== + + # all BEAM packages will be compile with your preferred erlang version + pkgs-beam = pkgs.beam.packagesWith erlang; + + # ==== Elixir ==== + + # use whatever version is currently defined in nixpkgs + # elixir = pkgs-beam.elixir; + + # use latest version of Elixir 1.17 + elixir = pkgs-beam.elixir_1_17; + + # specify exact version of Elixir + # elixir = pkgs-beam.elixir.override { + # version = "1.17.1"; + # sha256 = "sha256-a7A+426uuo3bUjggkglY1lqHmSbZNpjPaFpQUXYtW9k="; + # }; + + in + { + devShells.default = pkgs.mkShell { + packages = + [ + # use the Elixr/OTP versions defined above; will also install OTP, mix, hex, rebar3 + elixir + + # mix needs it for downloading dependencies + pkgs.git + + # probably needed for your Phoenix assets + pkgs.nodejs_20 + ] + ++ + # Linux only + pkgs.lib.optionals pkgs.stdenv.isLinux ( + with pkgs; + [ + gigalixir + inotify-tools + libnotify + ] + ) + ++ + # macOS only + pkgs.lib.optionals pkgs.stdenv.isDarwin ( + with pkgs; + [ + terminal-notifier + darwin.apple_sdk.frameworks.CoreFoundation + darwin.apple_sdk.frameworks.CoreServices + ] + ); + + # some sane defaults for iex session + env = { + ERL_INCLUDE_PATH = "${erlang}/lib/erlang/usr/include"; + ERL_AFLAGS = "+pc unicode -kernel shell_history enabled"; + ELIXIR_ERL_OPTIONS = "+sssdio 128"; + }; + }; + } + ); } diff --git a/elm/flake.lock b/elm/flake.lock index d4ecad3..1cbfc64 100644 --- a/elm/flake.lock +++ b/elm/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/empty/.envrc b/empty/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/empty/.envrc @@ -0,0 +1 @@ +use flake diff --git a/empty/flake.lock b/empty/flake.lock new file mode 100644 index 0000000..1cbfc64 --- /dev/null +++ b/empty/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/empty/flake.nix b/empty/flake.nix new file mode 100644 index 0000000..e02b193 --- /dev/null +++ b/empty/flake.nix @@ -0,0 +1,39 @@ +{ + description = "An empty flake template that you can adapt to your own environment"; + + # Flake inputs + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; + + # Flake outputs + outputs = { self, nixpkgs }: + let + # The systems supported for this flake + supportedSystems = [ + "x86_64-linux" # 64-bit Intel/AMD Linux + "aarch64-linux" # 64-bit ARM Linux + "x86_64-darwin" # 64-bit Intel macOS + "aarch64-darwin" # 64-bit ARM macOS + ]; + + # Helper to provide system-specific attributes + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in + { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + # The Nix packages provided in the environment + # Add any you need here + packages = with pkgs; [ ]; + + # Set any environment variables for your dev shell + env = { }; + + # Add any shell logic you want executed any time the environment is activated + shellHook = '' + ''; + }; + }); + }; +} diff --git a/flake.lock b/flake.lock index 0f56f8b..2ddc5f0 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", + "lastModified": 1706683685, + "narHash": "sha256-FtPPshEpxH/ewBOsdKBNhlsL2MLEFv1hEnQ19f/bFsQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", + "rev": "5ad9903c16126a7d949101687af0aa589b1d7d3d", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 100df82..b48f42c 100644 --- a/flake.nix +++ b/flake.nix @@ -8,35 +8,70 @@ overlays = [ (final: prev: let - exec = pkg: "${prev.${pkg}}/bin/${pkg}"; - in - { - format = prev.writeScriptBin "format" '' - ${exec "nixpkgs-fmt"} **/*.nix - ''; - dvt = prev.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 = prev.writeScriptBin "update" '' - for dir in `ls -d */`; do # Iterate through all the templates + getSystem = "SYSTEM=$(nix eval --impure --raw --expr 'builtins.currentSystem')"; + forEachDir = exec: '' + for dir in */; do ( - cd $dir - ${exec "nix"} flake update # Update flake.lock - ${exec "nix"} flake check # Make sure things work after the update + cd "''${dir}" + + ${exec} ) done ''; + in + { + format = final.writeShellApplication { + name = "format"; + runtimeInputs = with final; [ nixpkgs-fmt ]; + text = "nixpkgs-fmt '**/*.nix'"; + }; + + # only run this locally, as Actions will run out of disk space + build = final.writeShellApplication { + name = "build"; + text = '' + ${getSystem} + + ${forEachDir '' + echo "building ''${dir}" + nix build ".#devShells.''${SYSTEM}.default" + ''} + ''; + }; + + check = final.writeShellApplication { + name = "check"; + text = forEachDir '' + echo "checking ''${dir}" + nix flake check --all-systems --no-build + ''; + }; + + dvt = final.writeShellApplication { + name = "dvt"; + text = '' + if [ -z $1 ]; then + echo "no template specified" + exit 1 + fi + + TEMPLATE=$1 + + nix \ + --experimental-features 'nix-command flakes' \ + flake init \ + --template \ + "github:the-nix-way/dev-templates#''${TEMPLATE}" + ''; + }; + + update = final.writeShellApplication { + name = "update"; + text = forEachDir '' + echo "updating ''${dir}" + nix flake update + ''; + }; }) ]; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; @@ -47,7 +82,7 @@ { devShells = forEachSupportedSystem ({ pkgs }: { default = pkgs.mkShell { - packages = with pkgs; [ format update ]; + packages = with pkgs; [ build check format update ]; }; }); @@ -61,6 +96,11 @@ { templates = rec { + c-cpp = { + path = ./c-cpp; + description = "C/C++ development environment"; + }; + clojure = { path = ./clojure; description = "Clojure development environment"; @@ -91,6 +131,11 @@ description = "Elm development environment"; }; + empty = { + path = ./empty; + description = "Empty dev template that you can customize at will"; + }; + gleam = { path = ./gleam; description = "Gleam development environment"; @@ -146,6 +191,11 @@ description = "Node.js development environment"; }; + ocaml = { + path = ./ocaml; + description = "OCaml development environment"; + }; + opa = { path = ./opa; description = "Open Policy Agent development environment"; @@ -176,6 +226,11 @@ description = "Python development environment"; }; + r = { + path = ./r; + description = "R development environment"; + }; + ruby = { path = ./ruby; description = "Ruby development environment"; @@ -201,6 +256,11 @@ description = "Shell script development environment"; }; + vlang = { + path = ./vlang; + description = "Vlang developent environment"; + }; + zig = { path = ./zig; description = "Zig development environment"; @@ -208,6 +268,8 @@ # Aliases rt = rust-toolchain; + c = c-cpp; + cpp = c-cpp; }; }; } diff --git a/gleam/flake.lock b/gleam/flake.lock index d4ecad3..1cbfc64 100644 --- a/gleam/flake.lock +++ b/gleam/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/go/flake.lock b/go/flake.lock index d4ecad3..1cbfc64 100644 --- a/go/flake.lock +++ b/go/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/go/flake.nix b/go/flake.nix index c5b652d..34b98f6 100644 --- a/go/flake.nix +++ b/go/flake.nix @@ -1,11 +1,11 @@ { - description = "A Nix-flake-based Go 1.17 development environment"; + description = "A Nix-flake-based Go 1.22 development environment"; inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; outputs = { self, nixpkgs }: let - goVersion = 20; # Change this to update the whole stack + goVersion = 22; # Change this to update the whole stack overlays = [ (final: prev: { go = prev."go_1_${toString goVersion}"; }) ]; supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { @@ -16,7 +16,7 @@ devShells = forEachSupportedSystem ({ pkgs }: { default = pkgs.mkShell { packages = with pkgs; [ - # go 1.20 (specified by overlay) + # go (version is specified by overlay) go # goimports, godoc, etc. diff --git a/hashi/flake.lock b/hashi/flake.lock index d4ecad3..1cbfc64 100644 --- a/hashi/flake.lock +++ b/hashi/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/haskell/flake.lock b/haskell/flake.lock index d4ecad3..1cbfc64 100644 --- a/haskell/flake.lock +++ b/haskell/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/haxe/flake.lock b/haxe/flake.lock index 2effb16..1cbfc64 100644 --- a/haxe/flake.lock +++ b/haxe/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1697009197, - "narHash": "sha256-viVRhBTFT8fPJTb1N3brQIpFZnttmwo3JVKNuWRVc3s=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "01441e14af5e29c9d27ace398e6dd0b293e25a54", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/haxe/flake.nix b/haxe/flake.nix index 6c2c0ea..636f64e 100644 --- a/haxe/flake.nix +++ b/haxe/flake.nix @@ -1,7 +1,7 @@ { description = "A Nix-flake-based Haxe development environment"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; outputs = { self diff --git a/java/flake.lock b/java/flake.lock index d4ecad3..1cbfc64 100644 --- a/java/flake.lock +++ b/java/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/java/flake.nix b/java/flake.nix index 42b6255..d72cc26 100644 --- a/java/flake.nix +++ b/java/flake.nix @@ -21,7 +21,7 @@ { devShells = forEachSupportedSystem ({ pkgs }: { default = pkgs.mkShell { - packages = with pkgs; [ gradle jdk maven ]; + packages = with pkgs; [ gradle jdk maven jdt-language-server ]; }; }); }; diff --git a/kotlin/flake.lock b/kotlin/flake.lock index d4ecad3..1cbfc64 100644 --- a/kotlin/flake.lock +++ b/kotlin/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/latex/flake.lock b/latex/flake.lock index d4ecad3..1cbfc64 100644 --- a/latex/flake.lock +++ b/latex/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/nickel/flake.lock b/nickel/flake.lock index d4ecad3..1cbfc64 100644 --- a/nickel/flake.lock +++ b/nickel/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/nim/flake.lock b/nim/flake.lock index d4ecad3..1cbfc64 100644 --- a/nim/flake.lock +++ b/nim/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/nix/flake.lock b/nix/flake.lock index d4ecad3..1cbfc64 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/nix/flake.nix b/nix/flake.nix index 74bc720..a2a6d75 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -17,11 +17,10 @@ cachix lorri niv - nixfmt + nixfmt-classic statix vulnix haskellPackages.dhall-nix - rnix-lsp ]; }; }); diff --git a/node/flake.lock b/node/flake.lock index d4ecad3..1cbfc64 100644 --- a/node/flake.lock +++ b/node/flake.lock @@ -2,12 +2,12 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", - "revCount": 561409, + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.561409%2Brev-54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6/018c8732-ea5c-725f-a6c9-9ed48683aa5a/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { "type": "tarball", diff --git a/ocaml/flake.lock b/ocaml/flake.lock index 0f56f8b..1cbfc64 100644 --- a/ocaml/flake.lock +++ b/ocaml/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/opa/flake.lock b/opa/flake.lock index 0f56f8b..1cbfc64 100644 --- a/opa/flake.lock +++ b/opa/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/php/flake.lock b/php/flake.lock index 0f56f8b..1cbfc64 100644 --- a/php/flake.lock +++ b/php/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/protobuf/flake.lock b/protobuf/flake.lock index 0f56f8b..1cbfc64 100644 --- a/protobuf/flake.lock +++ b/protobuf/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/pulumi/flake.lock b/pulumi/flake.lock index 0f56f8b..1cbfc64 100644 --- a/pulumi/flake.lock +++ b/pulumi/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/pulumi/flake.nix b/pulumi/flake.nix index aac4e92..6c0509c 100644 --- a/pulumi/flake.nix +++ b/pulumi/flake.nix @@ -25,7 +25,7 @@ python311 # Go SDK - go_1_20 + go_1_22 # Node.js SDK nodejs diff --git a/purescript/flake.lock b/purescript/flake.lock index 4e78d08..3bbb0b2 100644 --- a/purescript/flake.lock +++ b/purescript/flake.lock @@ -3,11 +3,11 @@ "easy-purescript-nix": { "flake": false, "locked": { - "lastModified": 1686900973, - "narHash": "sha256-9whTjp8BYy8ZzyghhgbawS06/dVESduME3wsdNH/mpk=", + "lastModified": 1710161569, + "narHash": "sha256-lcIRIOFCdIWEGyKyG/tB4KvxM9zoWuBRDxW+T+mvIb0=", "owner": "justinwoo", "repo": "easy-purescript-nix", - "rev": "8cf400656945b2f2bacfd6a8775792aa701f60e9", + "rev": "117fd96acb69d7d1727df95b6fde9d8715e031fc", "type": "github" }, "original": { @@ -18,18 +18,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/python/flake.lock b/python/flake.lock index 0f56f8b..1cbfc64 100644 --- a/python/flake.lock +++ b/python/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/python/flake.nix b/python/flake.nix index 6cb2695..c995e07 100644 --- a/python/flake.nix +++ b/python/flake.nix @@ -13,8 +13,12 @@ { devShells = forEachSupportedSystem ({ pkgs }: { default = pkgs.mkShell { - packages = with pkgs; [ python311 virtualenv ] ++ - (with pkgs.python311Packages; [ pip ]); + venvDir = ".venv"; + packages = with pkgs; [ python311 ] ++ + (with pkgs.python311Packages; [ + pip + venvShellHook + ]); }; }); }; diff --git a/r/.envrc b/r/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/r/.envrc @@ -0,0 +1 @@ +use flake diff --git a/r/flake.lock b/r/flake.lock new file mode 100644 index 0000000..0f56f8b --- /dev/null +++ b/r/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1689261696, + "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/r/flake.nix b/r/flake.nix new file mode 100644 index 0000000..da334ef --- /dev/null +++ b/r/flake.nix @@ -0,0 +1,31 @@ +{ + description = "A Nix-flake-based R development environment"; + + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; + + outputs = { self, nixpkgs }: + let + overlays = [ + (final: prev: rec { + rEnv = prev.rWrapper.override { + packages = with prev.rPackages; [ knitr ]; + }; + }) + ]; + supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit overlays system; }; + }); + in + { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; + [ rEnv + pandoc + texlive.combined.scheme-full + ]; + }; + }); + }; +} diff --git a/ruby/flake.lock b/ruby/flake.lock index 0f56f8b..1cbfc64 100644 --- a/ruby/flake.lock +++ b/ruby/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/rust-toolchain/flake.lock b/rust-toolchain/flake.lock index 740a900..0a59404 100644 --- a/rust-toolchain/flake.lock +++ b/rust-toolchain/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -20,34 +20,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1681358109, - "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { @@ -59,14 +41,16 @@ "rust-overlay": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1689302058, - "narHash": "sha256-yD74lcHTrw4niXcE9goJLbzsgyce48rQQoy5jK5ZK40=", + "lastModified": 1713150335, + "narHash": "sha256-Ic7zCPfiSYc9nFFp+E44WFk3TBJ99J/uPZ4QXX+uPPw=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7b8dbbf4c67ed05a9bf3d9e658c12d4108bc24c8", + "rev": "b186d85e747e2b7bee220ec95839fb66c868dc47", "type": "github" }, "original": { diff --git a/rust/flake.lock b/rust/flake.lock index 740a900..0a59404 100644 --- a/rust/flake.lock +++ b/rust/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -20,34 +20,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1681358109, - "narHash": "sha256-eKyxW4OohHQx9Urxi7TQlFBTDWII+F+x2hklDOQPB50=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "96ba1c52e54e74c3197f4d43026b3f3d92e83ff9", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { @@ -59,14 +41,16 @@ "rust-overlay": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_2" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1689302058, - "narHash": "sha256-yD74lcHTrw4niXcE9goJLbzsgyce48rQQoy5jK5ZK40=", + "lastModified": 1713150335, + "narHash": "sha256-Ic7zCPfiSYc9nFFp+E44WFk3TBJ99J/uPZ4QXX+uPPw=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "7b8dbbf4c67ed05a9bf3d9e658c12d4108bc24c8", + "rev": "b186d85e747e2b7bee220ec95839fb66c868dc47", "type": "github" }, "original": { diff --git a/scala/flake.lock b/scala/flake.lock index 0f56f8b..1cbfc64 100644 --- a/scala/flake.lock +++ b/scala/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/shell/flake.lock b/shell/flake.lock index 0f56f8b..1cbfc64 100644 --- a/shell/flake.lock +++ b/shell/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": { diff --git a/vlang/.envrc b/vlang/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/vlang/.envrc @@ -0,0 +1 @@ +use flake diff --git a/vlang/flake.lock b/vlang/flake.lock new file mode 100644 index 0000000..1cbfc64 --- /dev/null +++ b/vlang/flake.lock @@ -0,0 +1,25 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/vlang/flake.nix b/vlang/flake.nix new file mode 100644 index 0000000..134872b --- /dev/null +++ b/vlang/flake.nix @@ -0,0 +1,22 @@ +{ + description = "A Nix-flake-based Vlang development environment"; + + inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz"; + + outputs = { self, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + in + { + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + packages = with pkgs; [ + vlang + ]; + }; + }); + }; +} diff --git a/zig/flake.lock b/zig/flake.lock index 0f56f8b..1cbfc64 100644 --- a/zig/flake.lock +++ b/zig/flake.lock @@ -2,18 +2,16 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1689261696, - "narHash": "sha256-LzfUtFs9MQRvIoQ3MfgSuipBVMXslMPH/vZ+nM40LkA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "df1eee2aa65052a18121ed4971081576b25d6b5c", - "type": "github" + "lastModified": 1712963716, + "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "revCount": 611350, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.611350%2Brev-cfd6b5fc90b15709b780a5a1619695a88505a176/018eddfc-e6d9-74bb-a823-20f2ae60079b/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.%2A.tar.gz" } }, "root": {