Remove mach-nix from python template

This commit is contained in:
Luc Perkins 2023-07-13 15:24:38 -07:00
parent a5887091c4
commit 7ad8ef0f50
No known key found for this signature in database
GPG key ID: CED8419FB058467A
2 changed files with 4 additions and 80 deletions

View file

@ -15,57 +15,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_2": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"mach-nix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs",
"pypi-deps-db": "pypi-deps-db"
},
"locked": {
"lastModified": 1674628768,
"narHash": "sha256-mia90VYv/YTdWNhKpvwvFW9RfbXZJSWhJ+yva6EnLE8=",
"owner": "DavHau",
"repo": "mach-nix",
"rev": "70daee1b200c9a24a0f742f605edadacdcb5c998",
"type": "github"
},
"original": {
"owner": "DavHau",
"repo": "mach-nix",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1643805626,
"narHash": "sha256-AXLDVMG+UaAGsGSpOtQHPIKB+IZ0KSd9WS77aanGzgc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "554d2d8aa25b6e583575459c297ec23750adb6cb",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1677655039, "lastModified": 1677655039,
"narHash": "sha256-IsU0SSBUOr/qYTkiwIgXQ91Io/2bfXI7PG4MoJritLA=", "narHash": "sha256-IsU0SSBUOr/qYTkiwIgXQ91Io/2bfXI7PG4MoJritLA=",
@ -81,27 +31,10 @@
"type": "github" "type": "github"
} }
}, },
"pypi-deps-db": {
"flake": false,
"locked": {
"lastModified": 1661155889,
"narHash": "sha256-t00mBTZhmZBT4jteO6pJbU0wyRS6/ep4pKmQNeztEms=",
"owner": "DavHau",
"repo": "pypi-deps-db",
"rev": "49c620f3de2b557c9d5c44f58a00fee59f27d1b0",
"type": "github"
},
"original": {
"owner": "DavHau",
"repo": "pypi-deps-db",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"mach-nix": "mach-nix", "nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
} }
} }
}, },

View file

@ -4,34 +4,25 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
mach-nix.url = "github:/DavHau/mach-nix";
}; };
outputs = outputs =
{ self { self
, nixpkgs , nixpkgs
, flake-utils , flake-utils
, mach-nix
}: }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
overlays = [ pkgs = import nixpkgs { inherit system; };
(self: super: {
machNix = mach-nix.defaultPackage.${system};
python = super.python311;
})
];
pkgs = import nixpkgs { inherit overlays system; };
in in
{ {
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
packages = with pkgs; [ python machNix virtualenv ] ++ packages = with pkgs; [ python311 virtualenv ] ++
(with pkgs.python311Packages; [ pip ]); (with pkgs.python311Packages; [ pip ]);
shellHook = '' shellHook = ''
${pkgs.python}/bin/python --version ${pkgs.python311}/bin/python --version
''; '';
}; };
}); });