fix: getting the build to work

This commit is contained in:
D. Moonfire 2023-11-05 11:30:12 -06:00
parent f802c10a3c
commit 5a8bcc213c

View file

@ -3,57 +3,62 @@
inputs = { inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz"; nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz";
flake-utils.url = flake-utils.url = "https://flakehub.com/f/numtide/flake-utils/0.1.85.tar.gz";
"https://flakehub.com/f/numtide/flake-utils/0.1.85.tar.gz";
}; };
outputs = { self, nixpkgs, flake-utils, ... }: outputs = {
let pythonVersion = "python39"; self,
in flake-utils.lib.eachDefaultSystem (system: nixpkgs,
let flake-utils,
pkgs = nixpkgs.legacyPackages.${system}; ...
lib = pkgs.lib; }: let
python3Packages = pkgs.python3Packages; pythonVersion = "python39";
fetchPypi = pkgs.fetchPypi; in
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
lib = pkgs.lib;
python3Packages = pkgs.python3Packages;
fetchPypi = pkgs.fetchPypi;
src = pkgs.fetchFromGitHub { pkgSrc = pkgs.fetchFromGitHub {
owner = "webcomics"; owner = "webcomics";
repo = "dosage"; repo = "dosage";
rev = "9163317abadcef0a562afaaf422828b56d006e20"; rev = "9163317abadcef0a562afaaf422828b56d006e20";
hash = "sha256-t5HxvXCFPNG5K1uDtfIxDo6JV921ywY1Eznj7GoSh44="; hash = "sha256-t5HxvXCFPNG5K1uDtfIxDo6JV921ywY1Eznj7GoSh44=";
}; };
in rec { in rec {
defaultPackage = python3Packages.buildPythonApplication rec { defaultPackage = python3Packages.buildPythonApplication rec {
pname = "dosage"; pname = "dosage";
version = "3.1.dev104+g9e05fae304"; version = "3.1.dev104+g9e05fae304";
format = "pyproject"; format = "pyproject";
nativeCheckInputs = with python3Packages; [ nativeCheckInputs = with python3Packages; [
pytestCheckHook pytestCheckHook
pytest-xdist pytest-xdist
responses responses
]; ];
requirements = "${src}/setup/requirements.txt"; src = pkgSrc;
requirements = "${src}/setup/requirements.txt";
nativeBuildInputs = with python3Packages; [ setuptools-scm ]; nativeBuildInputs = with python3Packages; [setuptools-scm];
propagatedBuildInputs = with python3Packages; [ propagatedBuildInputs = with python3Packages; [
colorama colorama
imagesize imagesize
lxml lxml
platformdirs platformdirs
requests requests
]; ];
meta = { meta = {
description = "A comic strip downloader and archiver"; description = "A comic strip downloader and archiver";
homepage = "https://dosage.rocks/"; homepage = "https://dosage.rocks/";
license = lib.licenses.mit; license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dmoonfire ]; maintainers = with lib.maintainers; [dmoonfire];
};
}; };
};
formatter = pkgs.alejandra; formatter = pkgs.alejandra;
}); });
} }