Created
June 18, 2026 17:14
-
-
Save Comamoca/4ddc50de16fdf1230eceba47b88cca8e to your computer and use it in GitHub Desktop.
OpenHSP flake (minimal, build-only)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "nodes": { | |
| "nixpkgs": { | |
| "locked": { | |
| "lastModified": 1773628058, | |
| "narHash": "sha256-hpXH0z3K9xv0fHaje136KY872VT2T5uwxtezlAskQgY=", | |
| "owner": "nixos", | |
| "repo": "nixpkgs", | |
| "rev": "f8573b9c935cfaa162dd62cc9e75ae2db86f85df", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "nixos", | |
| "ref": "nixpkgs-unstable", | |
| "repo": "nixpkgs", | |
| "type": "github" | |
| } | |
| }, | |
| "root": { | |
| "inputs": { | |
| "nixpkgs": "nixpkgs" | |
| } | |
| } | |
| }, | |
| "root": "root", | |
| "version": 7 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| description = "OpenHSP - Hot Soup Processor (HSP3)"; | |
| inputs = { | |
| nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable"; | |
| }; | |
| outputs = | |
| { self, nixpkgs }: | |
| let | |
| supportedSystems = [ "x86_64-linux" "aarch64-linux" ]; | |
| forAllSystems = nixpkgs.lib.genAttrs supportedSystems; | |
| in | |
| { | |
| packages = forAllSystems (system: | |
| let | |
| pkgs = nixpkgs.legacyPackages.${system}; | |
| stdenv = pkgs.stdenv; | |
| openhsp = stdenv.mkDerivation { | |
| pname = "openhsp"; | |
| version = "3.6"; | |
| src = pkgs.lib.cleanSourceWith { | |
| filter = path: type: | |
| let | |
| basename = builtins.baseNameOf path; | |
| in | |
| basename != ".direnv" | |
| && basename != ".git" | |
| && pkgs.lib.cleanSourceFilter path type; | |
| src = ./.; | |
| }; | |
| nativeBuildInputs = with pkgs; [ | |
| pkg-config | |
| ]; | |
| buildInputs = with pkgs; [ | |
| SDL2 | |
| SDL2_image | |
| SDL2_mixer | |
| SDL2_ttf | |
| gtk2 | |
| glew | |
| libGL | |
| mesa | |
| curl | |
| libgpiod_1 | |
| libffi | |
| ]; | |
| # SDL2_ttf.h uses #include "SDL.h" (quotes, not <SDL2/SDL.h>), | |
| # so we must add the SDL2 include directory directly. | |
| NIX_CFLAGS_COMPILE = [ | |
| "-I${pkgs.SDL2.dev}/include/SDL2" | |
| ]; | |
| buildPhase = '' | |
| runHook preBuild | |
| make clean || true | |
| make -j$(nproc) | |
| runHook postBuild | |
| ''; | |
| installPhase = '' | |
| runHook preInstall | |
| mkdir -p $out/bin | |
| for bin in hsp3dish hsp3gp hsp3cl hspcmp hsed; do | |
| [ -f "$bin" ] && cp "$bin" $out/bin/ | |
| done | |
| # Install data directories | |
| mkdir -p $out/share/openhsp | |
| for dir in common doclib doclib_en sample hsphelp hsphelp_en hspsdk hsptv; do | |
| [ -d "$dir" ] && cp -r "$dir" $out/share/openhsp/ | |
| done | |
| # Copy additional assets | |
| for f in index.htm index_en.htm main.css single.css hsed.desktop hsed.png ipaexg.ttf; do | |
| [ -f "$f" ] && cp "$f" $out/share/openhsp/ | |
| done | |
| runHook postInstall | |
| ''; | |
| meta = { | |
| description = "Hot Soup Processor (HSP3) - a scripting language system"; | |
| longDescription = '' | |
| OpenHSP/Hot Soup Processor (HSP3) is a scripting language system that | |
| anyone can easily use. You can easily build applications such as game | |
| programs, screen savers, tools and practical software using images just | |
| by writing a text script. | |
| ''; | |
| homepage = "https://github.com/onitama/OpenHSP"; | |
| license = pkgs.lib.licenses.bsd3; | |
| platforms = pkgs.lib.platforms.linux; | |
| mainProgram = "hsp3cl"; | |
| maintainers = with pkgs.lib.maintainers; [ ]; | |
| }; | |
| }; | |
| in | |
| { | |
| default = openhsp; | |
| inherit openhsp; | |
| }); | |
| }; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment