1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
{
description = "View/select the URLs in an email message or file";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
};
outputs = {
self,
nixpkgs,
}: let
systems = ["x86_64-linux" "i686-linux" "aarch64-linux"];
forAllSystems = f:
nixpkgs.lib.genAttrs systems (system:
f rec {
pkgs = nixpkgs.legacyPackages.${system};
commonPackages = builtins.attrValues {
inherit
(pkgs.python3Packages)
python
urwid
;
};
});
in {
devShells = forAllSystems ({
pkgs,
commonPackages,
}: {
default = pkgs.mkShell {
packages = commonPackages ++ [pkgs.pandoc];
shellHook = ''
alias urlscan="python -m urlscan"
export PYTHONPATH="$PYTHONPATH:$PWD"
'';
};
});
packages = forAllSystems ({
pkgs,
commonPackages,
}: {
default = pkgs.python3Packages.buildPythonApplication {
name = "urlscan";
pname = "urlscan";
format = "pyproject";
src = ./.;
nativeBuildInputs = builtins.attrValues {
inherit
(pkgs)
git
;
inherit
(pkgs.python3Packages)
hatchling
hatch-vcs
;
};
propagatedBuildInputs = commonPackages;
meta = {
description = "View/select the URLs in an email message or file";
homepage = "https://github.com/firecat53/urlscan";
license = pkgs.lib.licenses.gpl2Plus;
maintainers = ["firecat53"];
platforms = systems;
};
};
});
};
}
|