diff --git a/flake.lock b/flake.lock index 1c05842..6122726 100644 --- a/flake.lock +++ b/flake.lock @@ -2,26 +2,11 @@ "nodes": { "flake-utils": { "locked": { - "lastModified": 1638122382, - "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=", + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", "owner": "numtide", "repo": "flake-utils", - "rev": "74f7e4319258e287b0f9cb95426c9853b282730b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "locked": { - "lastModified": 1601282935, - "narHash": "sha256-WQAFV6sGGQxrRs3a+/Yj9xUYvhTpukQJIcMbIi7LCJ4=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "588973065fce51f4763287f0fda87a174d78bf48", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", "type": "github" }, "original": { @@ -32,16 +17,20 @@ }, "mach-nix": { "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs", + "flake-utils": [ + "flake-utils" + ], + "nixpkgs": [ + "nixpkgs" + ], "pypi-deps-db": "pypi-deps-db" }, "locked": { - "lastModified": 1637687243, - "narHash": "sha256-Qm0hPR9ZT1EP7lRW4udAPeb4yv6D2ONcw9ayterTP18=", + "lastModified": 1643434273, + "narHash": "sha256-FMDYaSTqk2YHBr8ipEzoVOIsParaDXXqagvkq1Z3Plk=", "owner": "DavHau", "repo": "mach-nix", - "rev": "31b21203a1350bff7c541e9dfdd4e07f76d874be", + "rev": "7f1372dae793f36718be6122b0a2e8d99c46c43f", "type": "github" }, "original": { @@ -52,26 +41,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1622797669, - "narHash": "sha256-xIyWeoYExzF0KNaKcqfxEX58fN4JTIQxTJWbsAujllc=", + "lastModified": 1643247693, + "narHash": "sha256-rmShxIuNjYBz4l83J0J++sug+MURUY1koPCzX4F8hfo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1ca6b0a0cc38dbba0441202535c92841dd39d1ae", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1638887115, - "narHash": "sha256-emjtIeqyJ84Eb3X7APJruTrwcfnHQKs55XGljj62prs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "1bd4bbd49bef217a3d1adea43498270d6e779d65", + "rev": "6c4b9f1a2fd761e2d384ef86cff0d208ca27fdca", "type": "github" }, "original": { @@ -84,11 +58,11 @@ "pypi-deps-db": { "flake": false, "locked": { - "lastModified": 1622970040, - "narHash": "sha256-u//RFnae/XMIhoy83G2uH2Qu/1LiUhVCdwwY1xj4Ufs=", + "lastModified": 1643616392, + "narHash": "sha256-knfGO4MZLMHGzd6iAnrVhUYyx5Vtz5VlisXgDNXfocM=", "owner": "DavHau", "repo": "pypi-deps-db", - "rev": "be6591698c67a86a69c81fef72167e38d038a9fc", + "rev": "ff3ee671a4b51f789335c650200d126297bf6391", "type": "github" }, "original": { @@ -101,7 +75,7 @@ "inputs": { "flake-utils": "flake-utils", "mach-nix": "mach-nix", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index 1e739d3..515abe3 100644 --- a/flake.nix +++ b/flake.nix @@ -2,18 +2,31 @@ description = "A Python API for various tools I use at work."; inputs = { nixpkgs.url = github:NixOS/nixpkgs/nixos-21.11; - flake-utils.url = github:numtide/flake-utils; - mach-nix.url = "github:DavHau/mach-nix"; + flake-utils = { + url = github:numtide/flake-utils; + }; + mach-nix = { + url = "github:DavHau/mach-nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-utils.follows = "flake-utils"; + pypi-deps-db = { + url = "github:DavHau/pypi-deps-db"; + }; + }; + }; }; - outputs = { self, nixpkgs, flake-utils, mach-nix }: - with flake-utils.lib; eachSystem allSystems (system: + outputs = { self, nixpkgs, flake-utils, mach-nix, ... }@inputs: + flake-utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; + machNix = mach-nix.lib."${system}"; in - rec { - devShell = pkgs.mkShell { - buildInputs = [ pkgs.gnumake ]; + { + devShell = machNix.mkPythonShell { + packagesExtra = with pkgs; [ pkgs.gnumake ]; + requirements = builtins.readFile ./requirements/local.txt; }; }); }