From 794ed83a6c840703798b80503643025327e5c24d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Thu, 30 Dec 2021 23:18:59 +0100 Subject: Convert to use flake.nix The flakes are the future as it seems and thus it makes more sense to use that. --- default.nix | 1 - flake.lock | 41 +++++++++++++++++++++++++++++++++++++++++ flake.nix | 13 +++++++++++++ pkgs/default.nix | 4 ++-- 4 files changed, 56 insertions(+), 3 deletions(-) delete mode 100644 default.nix create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/default.nix b/default.nix deleted file mode 100644 index 26470b5..0000000 --- a/default.nix +++ /dev/null @@ -1 +0,0 @@ -import ./pkgs diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..4777cb3 --- /dev/null +++ b/flake.lock @@ -0,0 +1,41 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1638122382, + "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1641076644, + "narHash": "sha256-4x90qQM4wOfPAzdMnN1BnzVp7eO6wle+F5NmVkJ48qM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0fd74961da9fe2640ad2fbd960c3af08246e6749", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..30f1a38 --- /dev/null +++ b/flake.nix @@ -0,0 +1,13 @@ +{ + description = "Turris flake"; + + inputs.flake-utils.url = "github:numtide/flake-utils"; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachSystem flake-utils.lib.allSystems (system: rec { + packages = import ./pkgs { + nixlib = nixpkgs.lib; + nixpkgs = nixpkgs.legacyPackages.${system}; + }; + }); +} diff --git a/pkgs/default.nix b/pkgs/default.nix index 576da5b..ea787f4 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,8 +1,8 @@ -{ nixpkgs ? import {}}: +{ nixlib, nixpkgs }: let pkgs = nixpkgs // turrispkgs; - callPackage = pkgs.lib.callPackageWith pkgs; + callPackage = nixlib.callPackageWith pkgs; turrispkgs = with pkgs; { bootstrapHook = callPackage ( -- cgit v1.2.3