mirror of
https://github.com/tomasriveral/ReSSPublica.git
synced 2026-08-12 02:38:37 +02:00
flake.nix: add package
This commit is contained in:
@@ -3,29 +3,37 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs }:
|
outputs = { self, nixpkgs, flake-utils}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
systems = [
|
pkgs = import nixpkgs { inherit system; };
|
||||||
"x86_64-linux"
|
|
||||||
"aarch64-linux"
|
|
||||||
"x86_64-darwin"
|
|
||||||
"aarch64-darwin"
|
|
||||||
];
|
|
||||||
|
|
||||||
forAllSystems = f:
|
|
||||||
nixpkgs.lib.genAttrs systems (system:
|
|
||||||
f (import nixpkgs { inherit system; }));
|
|
||||||
in {
|
in {
|
||||||
devShells = forAllSystems (pkgs: {
|
packages.resspublica = pkgs.python314Packages.buildPythonApplication {
|
||||||
|
pname = "resspublica";
|
||||||
|
version = "0.1";
|
||||||
|
src = ./src;
|
||||||
|
pyproject = true;
|
||||||
|
|
||||||
|
build-system = with pkgs.python314Packages; [ setuptools ];
|
||||||
|
|
||||||
|
dependencies = with pkgs.python314Packages; [
|
||||||
|
sparqlwrapper
|
||||||
|
feedgen
|
||||||
|
];
|
||||||
|
mainProgram = "resspublica.py";
|
||||||
|
};
|
||||||
|
packages.default = self.packages.${system}.resspublica;
|
||||||
|
devShells = {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
python3
|
python3
|
||||||
python3Packages.sparqlwrapper
|
python314Packages.sparqlwrapper
|
||||||
python3Packages.feedgen
|
python314Packages.feedgen
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user