add dev shell flake

This commit is contained in:
Vinzenz Schroeter 2024-11-05 22:24:03 +01:00
parent 817f574ec2
commit f7a5d8f823
3 changed files with 53 additions and 0 deletions

27
flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1730327045,
"narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "080166c15633801df010977d9d7474b4a6c549d7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

25
flake.nix Normal file
View file

@ -0,0 +1,25 @@
{
description = "Dev shell flake for servicepoint-tanks";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.05";
};
outputs =
{ self, nixpkgs }:
let
lib = nixpkgs.lib;
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
in
{
devShells = forAllSystems (system: {
default = import ./shell.nix {
inherit nixpkgs;
pkgs = nixpkgs.legacyPackages."${system}";
lib = nixpkgs.lib;
};
});
formatter = forAllSystems (system: nixpkgs.legacyPackages."${system}".nixfmt-rfc-style);
};
}

View file

@ -1,5 +1,6 @@
{ {
pkgs ? import <nixpkgs> { }, pkgs ? import <nixpkgs> { },
...
}: }:
let let
rust-toolchain = pkgs.symlinkJoin { rust-toolchain = pkgs.symlinkJoin {