initial commit
This commit is contained in:
commit
3dee9bf679
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
# Nix #
|
||||||
|
/result
|
||||||
|
|
||||||
|
# balatromobile #
|
||||||
|
/balatro*.apk
|
21
default.nix
Normal file
21
default.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
fetchgit,
|
||||||
|
python3Packages,
|
||||||
|
jdk,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/antipatico/balatromobile";
|
||||||
|
sha256 = "P6MVmDiI6NLHqBYdkbtqExHKjkjLeD5bE/kTEyPxVTw=";
|
||||||
|
fetchLFS = true;
|
||||||
|
};
|
||||||
|
pname = (builtins.fromTOML (builtins.readFile "${src}/pyproject.toml")).project.name;
|
||||||
|
version = builtins.elemAt (builtins.match ".*([0-9]+\.[0-9]+\.[0-9]+).*" (builtins.readFile "${src}/balatromobile/__version__.py")) 0;
|
||||||
|
in
|
||||||
|
python3Packages.buildPythonPackage {
|
||||||
|
inherit pname version src;
|
||||||
|
|
||||||
|
pyproject = true;
|
||||||
|
build-system = [python3Packages.flit];
|
||||||
|
dependencies = [python3Packages.tabulate jdk];
|
||||||
|
}
|
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1745234285,
|
||||||
|
"narHash": "sha256-GfpyMzxwkfgRVN0cTGQSkTC0OHhEkv3Jf6Tcjm//qZ0=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "c11863f1e964833214b767f4a369c6e6a7aba141",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
32
flake.nix
Normal file
32
flake.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
description = "A Python Project Template.";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
...
|
||||||
|
} @ inputs: let
|
||||||
|
supportedSystems = ["x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin"];
|
||||||
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
|
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
|
||||||
|
in {
|
||||||
|
# `nix build`
|
||||||
|
packages = forAllSystems (system: rec {
|
||||||
|
default = balatromobile;
|
||||||
|
balatromobile = pkgs.${system}.callPackage ./default.nix {};
|
||||||
|
});
|
||||||
|
|
||||||
|
# `nix run`
|
||||||
|
apps = forAllSystems (system: rec {
|
||||||
|
default = balatromobile;
|
||||||
|
balatromobile = {
|
||||||
|
program = "${self.packages.${system}.balatromobile}/bin/balatromobile";
|
||||||
|
type = "app";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user