123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159 |
- {
- description = "A flake for building get";
- inputs = {
- nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
- flake-utils.url = github:numtide/flake-utils;
- nur.url = github:nix-community/NUR;
- };
- outputs = { self, nixpkgs, flake-utils, nur }:
- 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.fetchFromGitHub {
- owner = "hoffstadt";
- repo = "DearPyGui";
- rev = "v${version}";
- fetchSubmodules = true;
- hash = "sha256-Af1jhQYT0CYNFMWihAtP6jRNYKm3XKEu3brFOPSGCnk=";
- };
- cmakeFlags = [ "-DMVDIST_ONLY=True" ];
- postConfigure = ''
- cd $cmakeDir
- mv build cmake-build-local
- '';
- nativeBuildInputs = [ pkgs.pkg-config pkgs.cmake ];
- buildInputs = [
- pkgs.libxcrypt
- pkgs.xorg.libX11.dev
- pkgs.xorg.libXrandr.dev
- pkgs.xorg.libXinerama.dev
- pkgs.xorg.libXcursor.dev
- pkgs.xorg.xinput
- pkgs.xorg.libXi.dev
- pkgs.xorg.libXext
- # are in submodules but well cmake and setuptools are hell of a couple
- pkgs.glfw
- pkgs.glew
- ];
- dontUseSetuptoolsCheck = true;
- pythonImportsCheck = [
- "dearpygui"
- ];
- meta = {
- #maintainers = [ lib.maintainers.SomeoneSerge ];
- #license = lib.licenses.mit;
- description = ''
- Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
- '';
- homepage = "https://dearpygui.readthedocs.io/en/";
- #broken = stdenv.isDarwin;
- #platforms = lib.platforms.unix;
- };};
- 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 ";
- }
|