This commit is contained in:
parent
0046dfc8d8
commit
ef8d85d388
2 changed files with 15 additions and 52 deletions
34
flake.lock
generated
34
flake.lock
generated
|
@ -1,23 +1,5 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1731533236,
|
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1752480373,
|
"lastModified": 1752480373,
|
||||||
|
@ -36,24 +18,8 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"systems": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
33
flake.nix
33
flake.nix
|
@ -1,20 +1,18 @@
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
let
|
||||||
let
|
pyprojecttoml = nixpkgs.lib.importTOML ./pyproject.toml;
|
||||||
pkgs = import nixpkgs { system = system; };
|
|
||||||
pyprojecttoml = nixpkgs.lib.importTOML ./pyproject.toml;
|
|
||||||
|
|
||||||
supermarktconnector = pkgs.python3Packages.buildPythonPackage {
|
supermarktconnector = { python3Packages, fetchFromGitHub }:
|
||||||
|
python3Packages.buildPythonPackage {
|
||||||
pname = "supermarktconnector";
|
pname = "supermarktconnector";
|
||||||
version = "0.8.1-2";
|
version = "0.8.1-2";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
src = pkgs.fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "bartmachielsen";
|
owner = "bartmachielsen";
|
||||||
repo = "SupermarktConnector";
|
repo = "SupermarktConnector";
|
||||||
rev = "393c8698a34393f233a0bef45022954bfabe4247";
|
rev = "393c8698a34393f233a0bef45022954bfabe4247";
|
||||||
|
@ -22,15 +20,15 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
in rec {
|
in {
|
||||||
|
packages = builtins.mapAttrs (system: pkgs: rec {
|
||||||
packages.default = pkgs.python3Packages.buildPythonApplication {
|
default = pkgs.python3Packages.buildPythonApplication {
|
||||||
pname = pyprojecttoml.project.name;
|
pname = pyprojecttoml.project.name;
|
||||||
version = pyprojecttoml.project.version;
|
version = pyprojecttoml.project.version;
|
||||||
pyproject = true;
|
pyproject = true;
|
||||||
src = self;
|
src = self;
|
||||||
dependencies = with pkgs.python3Packages; [ pyquery pytest requests ]
|
dependencies = with pkgs.python3Packages; [ pyquery pytest requests ]
|
||||||
++ [ supermarktconnector ];
|
++ [ (pkgs.callPackage supermarktconnector {}) ];
|
||||||
nativeBuildInputs = with pkgs.python3Packages; [ setuptools ];
|
nativeBuildInputs = with pkgs.python3Packages; [ setuptools ];
|
||||||
nativeCheckInputs = with pkgs.python3Packages; [ pytest ]
|
nativeCheckInputs = with pkgs.python3Packages; [ pytest ]
|
||||||
++ [ pkgs.ruff ];
|
++ [ pkgs.ruff ];
|
||||||
|
@ -43,13 +41,12 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
packages.editable = pkgs.python3Packages.mkPythonEditablePackage {
|
editable = pkgs.python3Packages.mkPythonEditablePackage {
|
||||||
inherit (packages.default) pname version dependencies;
|
inherit (default) pname version dependencies;
|
||||||
scripts = pyprojecttoml.project.scripts;
|
scripts = pyprojecttoml.project.scripts;
|
||||||
root = "$PWD/src";
|
root = "$PWD/src";
|
||||||
passthru = { inherit (packages.default) nativeCheckInputs; };
|
passthru = { inherit (default) nativeCheckInputs; };
|
||||||
};
|
};
|
||||||
|
}) nixpkgs.legacyPackages;
|
||||||
}
|
};
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue