From 877b216eae612dbdabdeb2dd228e569c1f79f55e Mon Sep 17 00:00:00 2001 From: emily Date: Sat, 24 Aug 2024 18:23:57 +0200 Subject: [PATCH] refactor: nix flake --- flake.lock | 21 ++++++++++++++++++--- flake.nix | 12 ++++++++---- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index 655e86c9..fbdab2f2 100644 --- a/flake.lock +++ b/flake.lock @@ -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" } diff --git a/flake.nix b/flake.nix index 464f8804..d5c3c414 100644 --- a/flake.nix +++ b/flake.nix @@ -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; [