|
@@ -0,0 +1,135 @@
|
|
|
|
|
+{
|
|
|
|
|
+ description = "A flake for building get";
|
|
|
|
|
+ inputs = {
|
|
|
|
|
+ nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
|
|
|
|
|
+ flake-utils.url = github:numtide/flake-utils;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ outputs = { self, nixpkgs, flake-utils }:
|
|
|
|
|
+ flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
|
+ let
|
|
|
|
|
+ pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
|
+ arklog = pkgs.python3Packages.buildPythonPackage rec {
|
|
|
|
|
+ pname = "arklog";
|
|
|
|
|
+ version = "0.5.1";
|
|
|
|
|
+ format = "pyproject";
|
|
|
|
|
+ src = pkgs.python3Packages.fetchPypi {
|
|
|
|
|
+ inherit pname version;
|
|
|
|
|
+ sha256 = "334059a336e400cafbc9a1c382e747bee2c7660115c2d0612aa725beb845acd4";
|
|
|
|
|
+ };
|
|
|
|
|
+ propagatedBuildInputs = with pkgs.python3Packages; [
|
|
|
|
|
+ setuptools
|
|
|
|
|
+ flit-core
|
|
|
|
|
+ toml
|
|
|
|
|
+ pyaml
|
|
|
|
|
+ ];
|
|
|
|
|
+ doCheck = false;
|
|
|
|
|
+ meta = {
|
|
|
|
|
+ homepage = "https://git.rys.one/arrys/arklog";
|
|
|
|
|
+ description = "Custom python logging formatter with color output.";
|
|
|
|
|
+ };
|
|
|
|
|
+ };
|
|
|
|
|
+ owly = pkgs.python3Packages.buildPythonPackage rec {
|
|
|
|
|
+ pname = "owly";
|
|
|
|
|
+ version = "0.0.3";
|
|
|
|
|
+ format = "pyproject";
|
|
|
|
|
+ src = pkgs.python3Packages.fetchPypi {
|
|
|
|
|
+ inherit pname version;
|
|
|
|
|
+ sha256 = "e412c67c0c19c419fa630eb6d123f397d1d3eebd9bd5c8820cd0b52144bb94f3";
|
|
|
|
|
+ };
|
|
|
|
|
+ propagatedBuildInputs = with pkgs.python3Packages; [
|
|
|
|
|
+ setuptools
|
|
|
|
|
+ flit-core
|
|
|
|
|
+ toml
|
|
|
|
|
+ pyaml
|
|
|
|
|
+ ];
|
|
|
|
|
+ doCheck = false;
|
|
|
|
|
+ meta = {
|
|
|
|
|
+ homepage = "https://git.rys.one/arrys/owly-lib";
|
|
|
|
|
+ description = "SPARQL helper.";
|
|
|
|
|
+ };
|
|
|
|
|
+ };
|
|
|
|
|
+ dearpygui = pkgs.python3Packages.buildPythonPackage rec {
|
|
|
|
|
+ pname = "dearpygui";
|
|
|
|
|
+ version = "1.9.1";
|
|
|
|
|
+ src = pkgs.python3Packages.fetchPypi {
|
|
|
|
|
+ inherit pname version;
|
|
|
|
|
+ sha256 = "sha256-WgBv5EWQw2KgP+RRI3B07ZlWPQM08bxuxsfUmOykHkY=";
|
|
|
|
|
+ format = "wheel";
|
|
|
|
|
+ python = "cp310";
|
|
|
|
|
+ dist = "cp310";
|
|
|
|
|
+ abi = "cp310";
|
|
|
|
|
+ platform = "manylinux1_x86_64";
|
|
|
|
|
+ };
|
|
|
|
|
+ propagatedBuildInputs = with pkgs.python3Packages; [
|
|
|
|
|
+ setuptools
|
|
|
|
|
+ ];
|
|
|
|
|
+ doCheck = false;
|
|
|
|
|
+ meta = {
|
|
|
|
|
+ homepage = "https://github.com/hoffstadt/DearPyGui";
|
|
|
|
|
+ description = "dearpygui.";
|
|
|
|
|
+ };
|
|
|
|
|
+ };
|
|
|
|
|
+ in {
|
|
|
|
|
+ packages = rec {
|
|
|
|
|
+ get = pkgs.python3Packages.buildPythonPackage {
|
|
|
|
|
+ pname = "graph-exploring-tool";
|
|
|
|
|
+ version = "0.2.4";
|
|
|
|
|
+ format = "pyproject";
|
|
|
|
|
+ src = ./.;
|
|
|
|
|
+ nativeBuildInputs = [];
|
|
|
|
|
+ propagatedBuildInputs = with pkgs.python3Packages; [
|
|
|
|
|
+ #setuptools
|
|
|
|
|
+ flit-core
|
|
|
|
|
+ toml
|
|
|
|
|
+ arklog
|
|
|
|
|
+ rdflib
|
|
|
|
|
+ dacite
|
|
|
|
|
+ owly
|
|
|
|
|
+ certifi
|
|
|
|
|
+ dearpygui
|
|
|
|
|
+ ];
|
|
|
|
|
+# checkInputs = with pkgs.python3Packages; [
|
|
|
|
|
+# pytest
|
|
|
|
|
+# sparqlwrapper
|
|
|
|
|
+# ];
|
|
|
|
|
+# buildInputs = with pkgs.python3Packages; [
|
|
|
|
|
+# sphinx
|
|
|
|
|
+# tox
|
|
|
|
|
+# pip
|
|
|
|
|
+# flit
|
|
|
|
|
+# twine
|
|
|
|
|
+# numpy
|
|
|
|
|
+# invoke
|
|
|
|
|
+# jinja2
|
|
|
|
|
+# flake8
|
|
|
|
|
+# coverage
|
|
|
|
|
+# ];
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ # https://discourse.nixos.org/t/basic-flake-run-existing-python-bash-script/19886/2
|
|
|
|
|
+ server = let python = pkgs.python3.withPackages (ps: with ps; [ get ]); in pkgs.writeScriptBin "run-python" ''
|
|
|
|
|
+ ${python}/bin/python -m graph_exploring_tool
|
|
|
|
|
+ '';
|
|
|
|
|
+
|
|
|
|
|
+ launchScript = let python = pkgs.python3.withPackages (ps: with ps; [ get ]); in pkgs.writeTextFile {
|
|
|
|
|
+ name = "run.sh";
|
|
|
|
|
+ text = ''${python}/bin/python -m graph_exploring_tool'';
|
|
|
|
|
+ executable = true;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ default = get;
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ apps = rec {
|
|
|
|
|
+ # App that starts when invoking `nix run .#graph-exploring-tool`
|
|
|
|
|
+ get = {
|
|
|
|
|
+ type = "app";
|
|
|
|
|
+ program = "${self.packages.${system}.launchScript}";
|
|
|
|
|
+ };
|
|
|
|
|
+ # App that starts when invoking `nix run .`
|
|
|
|
|
+ default=get;
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+ nixConfig.bash-prompt-prefix = "\\e\[94;1m[graph-exploring-tool]\\e\[m ";
|
|
|
|
|
+}
|