diff --git a/.gitignore b/.gitignore index aa44cc3..8990f51 100644 --- a/.gitignore +++ b/.gitignore @@ -180,3 +180,5 @@ cython_debug/ # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ +# nix symlinks stuff here which is nice, but let's not be redundant +result/ diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..efc260c --- /dev/null +++ b/flake.lock @@ -0,0 +1,38 @@ +{ + "nodes": { + "flake-schemas": { + "locked": { + "narHash": "sha256-j8SR19V1SRysyJwpOBF4TLuAvAjF5t+gMiboN4gYQDU=", + "rev": "764932025c817d4e500a8d2a4d8c565563923d29", + "revCount": 29, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.2/018b3da8-4cc3-7fbb-8ff7-1588413c53e2/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%2A.tar.gz" + } + }, + "nixpkgs": { + "locked": { + "narHash": "sha256-/UmnB+mEd6Eg3mJBrAgqRcyZX//RSjHphcCO7Ig9Bpk=", + "rev": "621f51253edffa1d6f08d5fce4f08614c852d17e", + "revCount": 492069, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.2305.492069%2Brev-621f51253edffa1d6f08d5fce4f08614c852d17e/018b9714-e62c-710e-98df-31e33982dabc/source.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.2305.%2A.tar.gz" + } + }, + "root": { + "inputs": { + "flake-schemas": "flake-schemas", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..57b6db5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,48 @@ +# autopackaging themes would be RAD +# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.6) +{ + inputs = { + flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz"; + + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2305.*.tar.gz"; + }; + + + outputs = { self, flake-schemas, nixpkgs }: + let + supportedSystems = [ "x86_64-linux" "aarch64-darwin" "x86_64-darwin" "aarch64-linux" ]; + forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f { + pkgs = import nixpkgs { inherit system; }; + }); + + python = pkgs: (pkgs.python311.withPackages (py-pkgs: with py-pkgs; [ + pyqt6 + ])); + in { + schemas = flake-schemas.schemas; + + packages = forEachSupportedSystem ({ pkgs }: { + default = pkgs.stdenv.mkDerivation { + name = "pesterchum"; + src = ./.; + + installPhase = '' + mkdir -p $out/bin + mv * $out/bin/ + echo "#!/bin/sh" > $out/bin/pesterchum + echo "${python pkgs}/bin/python pesterchum.py" >> $out/bin/pesterchum + ''; + }; + }); + + devShells = forEachSupportedSystem ({ pkgs }: { + default = pkgs.mkShell { + + packages = with pkgs; [ + (python pkgs) + nixpkgs-fmt + ]; + }; + }); + }; +} diff --git a/result b/result new file mode 120000 index 0000000..13134de --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/982jr61vlj94rhx7k1p2s9dyc54zna0c-pesterchum \ No newline at end of file