Make it work

This commit is contained in:
Lauren Lagarde 2024-04-02 02:20:00 +00:00
parent c4e4d964d3
commit 45565af98f
2 changed files with 50 additions and 54 deletions

50
default.nix Normal file
View File

@ -0,0 +1,50 @@
{ lib
, stdenvNoCC
, fetchzip
, buildFHSEnv
}:
let
package = stdenvNoCC.mkDerivation rec {
pname = "CoolTerm";
version = "2.1.1";
src = fetchzip {
url = "https://freeware.the-meiers.org/previous/CoolTermLinux64Bit${builtins.replaceStrings ["."] [""] version}.zip";
sha256 = "sha256-ly01SivP0gghEfNT1SvexOB5Zumo/cwiNtkirkG+ncU=";
};
buildCommand = ''
mkdir -p $out/opt/
cp -r $src $out/opt/CoolTerm
'';
meta = with lib; {
description = "";
longDescription = ''
'';
homepage = "https://freeware.the-meiers.org/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ mlaga97 ];
platforms = [ "x86_64-linux" ];
};
};
in
buildFHSEnv {
inherit (package) pname meta;
runScript = "${package.outPath}/opt/CoolTerm/CoolTerm";
targetPkgs = pkgs: (with pkgs; [
libgcc
cairo
gtk3
libunwind
pango
atk
gtkd
glib
gdk-pixbuf
xorg.libX11
]);
}

View File

@ -1,54 +0,0 @@
{
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 = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/opt/
cp -r ./source/* $out/opt/
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;
};
};
};
}