mirror of
https://github.com/DeterminateSystems/update-flake-lock.git
synced 2025-04-21 09:20:16 +03:00
Update Nix shell and add envrc
This commit is contained in:
parent
cf6776dfd1
commit
b1f8684b21
10 changed files with 94352 additions and 53 deletions
36
flake.nix
36
flake.nix
|
@ -1,30 +1,24 @@
|
|||
{
|
||||
description = "update-flake-lock";
|
||||
|
||||
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.533189.tar.gz";
|
||||
inputs.nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.*.tar.gz";
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
}:
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
nameValuePair = name: value: { inherit name value; };
|
||||
genAttrs = names: f: builtins.listToAttrs (map (n: nameValuePair n (f n)) names);
|
||||
|
||||
allSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
forAllSystems = f: genAttrs allSystems
|
||||
(system: f {
|
||||
inherit system;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
supportedSystems = [ "x86_64-linux" "aarch64-darwin" "aarch64-linux" "x86_64-darwin" ];
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
in
|
||||
{
|
||||
devShell = forAllSystems
|
||||
({ system, pkgs, ... }:
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "update-flake-lock-devshell";
|
||||
buildInputs = [ pkgs.shellcheck ];
|
||||
src = self;
|
||||
});
|
||||
devShells = forEachSupportedSystem ({ pkgs }: {
|
||||
default = pkgs.mkShell {
|
||||
packages = with pkgs; [
|
||||
shellcheck
|
||||
nodejs_latest
|
||||
nodePackages_latest.pnpm
|
||||
];
|
||||
};
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue