pesterchum/flake.nix

48 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2023-11-03 21:32:47 -04:00
# 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
2023-11-03 21:42:02 -04:00
echo "${python pkgs}/bin/python $out/bin/pesterchum.py" >> $out/bin/pesterchum
2023-11-03 21:32:47 -04:00
'';
};
});
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [
(python pkgs)
nixpkgs-fmt
];
};
});
};
}