build(nix): add nix flake

This commit is contained in:
dusk 2024-12-21 04:12:58 +09:00 committed by alyssa
parent 2d564535af
commit be0c11d672
4 changed files with 581 additions and 16 deletions

View file

@ -1,15 +1,12 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShellNoCC {
packages = with pkgs; [
cargo rust-analyzer rustfmt
gcc
protobuf
dotnet-sdk_8
omnisharp-roslyn
go
nodejs yarn
];
NODE_OPTIONS = "--openssl-legacy-provider";
}
(import (
let
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
nodeName = lock.nodes.root.inputs.flake-compat;
in
fetchTarball {
url =
lock.nodes.${nodeName}.locked.url
or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.${nodeName}.locked.rev}.tar.gz";
sha256 = lock.nodes.${nodeName}.locked.narHash;
}
) { src = ./.; }).shellNix