refactor: nix flake

This commit is contained in:
emily 2024-08-24 18:23:57 +02:00
parent 832f72160f
commit 877b216eae
No known key found for this signature in database
GPG key ID: F6F4C66207FCF995
2 changed files with 26 additions and 7 deletions

View file

@ -1,5 +1,19 @@
{
"nodes": {
"flake-compat": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
@ -20,11 +34,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1723703277,
"narHash": "sha256-nk0RaUB5f68BwtXAYy3WAjqFhVKqIl9Z89RGycTa2vk=",
"lastModified": 1724395761,
"narHash": "sha256-zRkDV/nbrnp3Y8oCADf5ETl1sDrdmAW6/bBVJ8EbIdQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8b908192e64224420e2d59dfd9b2e4309e154c5d",
"rev": "ae815cee91b417be55d43781eb4b73ae1ecc396c",
"type": "github"
},
"original": {
@ -36,6 +50,7 @@
},
"root": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}

View file

@ -3,15 +3,15 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: {
outputs = { self, nixpkgs, flake-utils, ... }: {
hydraJobs = {
inherit (self) packages;
};
} // flake-utils.lib.eachDefaultSystem (system:
let
} // flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: let
pkgs = import nixpkgs {
inherit system;
};
@ -20,7 +20,11 @@
versiajs = pkgs.callPackage ./nix/package.nix {};
default = self.packages.${system}.versiajs;
};
}) // flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {
inherit system;
};
in {
devShells = {
default = pkgs.mkShell {
buildInputs = with pkgs; [