commit dd9e38752b8e488c2111df9dd582fa0622ff8f23 Author: Lauren Lagarde Date: Mon Apr 1 22:55:52 2024 +0000 Initial commit diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..19d40dd --- /dev/null +++ b/flake.nix @@ -0,0 +1,59 @@ +{ + description = "Test"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs"; + }; + + outputs = { self, nixpkgs }: { + defaultPackage.x86_64-linux = with import nixpkgs { + system = "x86_64-linux"; + }; stdenv.mkDerivation rec { + name = "coolterm"; + version = "2.1.1"; + + src = pkgs.fetchzip { + url = "https://freeware.the-meiers.org/previous/CoolTermLinux64Bit211.zip"; + sha256 = "sha256-ly01SivP0gghEfNT1SvexOB5Zumo/cwiNtkirkG+ncU="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + ]; + + buildInputs = [ + libgcc + cairo + gtk3 + libunwind + ]; + + sourceRoot = "."; + + #preFixup = let libPath = lib.makeLibraryPath [ + # cairo + # libgcc + #]; in '' + # patchelf \ + # --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ + # --set-rpath "${libPath}" \ + # $out/bin/CoolTerm + #''; + + installPhase = '' + runHook preInstall + for i in `ls -1 "./source/CoolTerm Libs/"`; do + install -m755 -D "./source/CoolTerm Libs/$i" $out/lib/$i + done + install -m755 -D "./source/CoolTerm" $out/bin/CoolTerm + runHook postInstall + ''; + + meta = with lib; { + homepage = "https://freeware.the-meiers.org/"; + description = "CoolTerm"; + platforms = platforms.linux; + }; + }; + }; +}