mirror of
https://github.com/thiloho/aurora.git
synced 2025-11-22 03:21:35 +01:00
Simplify and improve flake.nix
This commit is contained in:
7
flake.lock
generated
7
flake.lock
generated
@@ -2,15 +2,16 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1684787197,
|
"lastModified": 1695318763,
|
||||||
"narHash": "sha256-tvGDj3zgpW5NGoVKvoTQvkhfFPDgkbzfX+zFUW8NeHw=",
|
"narHash": "sha256-FHVPDRP2AfvsxAdc+AsgFJevMz5VBmnZglFUMlxBkcY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "e2614d8ebcdf9a9eae0efe074f4d745d28595886",
|
"rev": "e12483116b3b51a185a33a272bf351e357ba9a99",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
33
flake.nix
33
flake.nix
@@ -1,27 +1,17 @@
|
|||||||
{
|
{
|
||||||
description = "JavaScript development environment";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
inputs = {
|
outputs = { self, nixpkgs }: let
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
system = "x86_64-linux";
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
|
||||||
let
|
|
||||||
# Systems supported
|
|
||||||
allSystems = [
|
|
||||||
"x86_64-linux"
|
|
||||||
"aarch64-linux"
|
|
||||||
"x86_64-darwin"
|
|
||||||
"aarch64-darwin"
|
|
||||||
];
|
|
||||||
|
|
||||||
forAllSystems = f: nixpkgs.lib.genAttrs allSystems (system: f {
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
});
|
in {
|
||||||
in
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
{
|
packages = with pkgs; [
|
||||||
packages = forAllSystems ({ pkgs }: {
|
nodejs_20
|
||||||
default = pkgs.buildNpmPackage {
|
tree
|
||||||
|
];
|
||||||
|
};
|
||||||
|
packages.${system}.default = pkgs.buildNpmPackage {
|
||||||
name = "build-aurora-blog";
|
name = "build-aurora-blog";
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
nodejs_20
|
nodejs_20
|
||||||
@@ -34,6 +24,5 @@
|
|||||||
cp -r dist/* $out
|
cp -r dist/* $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
});
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user