Browse Source

Flake devShell (#1549)

pull/1553/head
Fedor Finenko 9 months ago committed by GitHub
parent
commit
7ef9761b10
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      .editorconfig
  2. 1
      .envrc
  3. 1
      .gitignore
  4. 27
      flake.lock
  5. 36
      flake.nix

4
.editorconfig

@ -18,6 +18,10 @@ indent_style = tab @@ -18,6 +18,10 @@ indent_style = tab
indent_style = space
indent_size = 2
[*.nix]
indent_style = space
indent_size = 2
[*.rb]
indent_style = space
indent_size = 2

1
.envrc

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

1
.gitignore vendored

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
/stage
/parts
/prime
.direnv
.gitignore.swp
.DS_Store
result

27
flake.lock

@ -0,0 +1,27 @@ @@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1742800061,
"narHash": "sha256-oDJGK1UMArK52vcW9S5S2apeec4rbfNELgc50LqiPNs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1750f3c1c89488e2ffdd47cab9d05454dddfb734",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

36
flake.nix

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
{
description = "onefetch";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};
outputs = {
self,
nixpkgs,
...
}: let
forAllSystems = fn: nixpkgs.lib.genAttrs [
"aarch64-darwin"
"aarch64-linux"
"i686-linux"
"x86_64-linux"
"x86_64-darwin"
] (system: fn nixpkgs.legacyPackages.${system});
in {
devShells = forAllSystems (pkgs: {
default = pkgs.mkShell {
name = "onefetch";
packages = with pkgs; [
cargo
rustc
clippy
rustfmt
rust-analyzer
cmake
];
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
};
});
};
}
Loading…
Cancel
Save