Browse Source

Basic Nix env

Signed-off-by: main <magic_rb@redalder.org>
master
main 2 months ago
parent
commit
aa780c657d
  1. 1
      .envrc
  2. 2
      .gitignore
  3. 27
      flake.lock
  4. 25
      flake.nix

1
.envrc

@ -0,0 +1 @@
use flake

2
.gitignore

@ -0,0 +1,2 @@
.direnv
flake.lock

27
flake.lock

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1637973395,
"narHash": "sha256-wp/QgsnnKJAIMZeQgJT1bWQ/OutZ+80lHwtpYAUWDfE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4f37689c8a219a9d756c5ff38525ad09349f422f",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

25
flake.nix

@ -0,0 +1,25 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-21.05";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" ];
forAllSystems' = nixpkgs.lib.genAttrs;
forAllSystems = forAllSystems' supportedSystems;
pkgsForSystem = system: import nixpkgs { inherit system; overlays = [ ]; };
in
{
devShell = forAllSystems (system:
let pkgs = pkgsForSystem system;
in
pkgs.mkShell {
nativeBuildInputs = with pkgs; [
gcc11
clang_12
];
}
);
};
}
Loading…
Cancel
Save