From 3e51cd164d21da438c782eaf0c3cd41c5a3898df Mon Sep 17 00:00:00 2001 From: luc65r Date: Mon, 26 Oct 2020 22:38:28 +0100 Subject: [PATCH 1/7] libticonv: init at 1.1.5 --- .../libraries/libticonv/default.nix | 38 +++++++++++++++++++ pkgs/misc/emulators/tilem/default.nix | 15 ++------ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 43 insertions(+), 12 deletions(-) create mode 100644 pkgs/development/libraries/libticonv/default.nix diff --git a/pkgs/development/libraries/libticonv/default.nix b/pkgs/development/libraries/libticonv/default.nix new file mode 100644 index 00000000000..0c075406dee --- /dev/null +++ b/pkgs/development/libraries/libticonv/default.nix @@ -0,0 +1,38 @@ +{ stdenv +, lib +, fetchurl +, pkg-config +, autoreconfHook +, glib +}: + +stdenv.mkDerivation rec { + pname = "libticonv"; + version = "1.1.5"; + src = fetchurl { + url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; + sha256 = "0y080v12bm81wgjm6fnw7q0yg7scphm8hhrls9njcszj7fkscv9i"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + buildInputs = [ + glib + ]; + + configureFlags = [ + "--enable-iconv" + ]; + + meta = with lib; { + changelog = "http://lpg.ticalc.org/prj_tilp/news.html"; + description = "This library is part of the TiLP framework"; + homepage = "http://lpg.ticalc.org/prj_tilp/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ siraben luc65r ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/pkgs/misc/emulators/tilem/default.nix b/pkgs/misc/emulators/tilem/default.nix index 2e96dc03d14..4948944191b 100644 --- a/pkgs/misc/emulators/tilem/default.nix +++ b/pkgs/misc/emulators/tilem/default.nix @@ -11,19 +11,9 @@ , lzma , bzip2 , gnome2 +, libticonv }: let - libticonv = stdenv.mkDerivation rec { - pname = "libticonv"; - version = "1.1.5"; - src = fetchurl { - url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; - sha256 = "0y080v12bm81wgjm6fnw7q0yg7scphm8hhrls9njcszj7fkscv9i"; - }; - nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ glib ]; - configureFlags = [ "--enable-iconv" ]; - }; libticables2 = stdenv.mkDerivation rec { pname = "libticables2"; version = "1.3.5"; @@ -58,6 +48,7 @@ let buildInputs = [ glib libticonv libarchive lzma bzip2 ]; }; in + stdenv.mkDerivation rec { pname = "tilem"; version = "2.0"; @@ -72,7 +63,7 @@ stdenv.mkDerivation rec { homepage = "http://lpg.ticalc.org/prj_tilem/"; description = "Emulator and debugger for Texas Instruments Z80-based graphing calculators"; license = licenses.gpl3Plus; - maintainers = with maintainers; [ siraben ]; + maintainers = with maintainers; [ siraben luc65r ]; platforms = platforms.linux ++ platforms.darwin; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9c012242c38..a0619bef6df 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15270,6 +15270,8 @@ in libthreadar = callPackage ../development/libraries/libthreadar { }; + libticonv = callPackage ../development/libraries/libticonv { }; + libtiff = callPackage ../development/libraries/libtiff { }; libtiger = callPackage ../development/libraries/libtiger { }; From eadb35d09891b6bd01f93d59e801a76c8b21007e Mon Sep 17 00:00:00 2001 From: luc65r Date: Mon, 26 Oct 2020 22:42:34 +0100 Subject: [PATCH 2/7] libtifiles2: init at 1.1.7 --- .../libraries/libtifiles2/default.nix | 38 +++++++++++++++++++ pkgs/misc/emulators/tilem/default.nix | 14 +------ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 41 insertions(+), 13 deletions(-) create mode 100644 pkgs/development/libraries/libtifiles2/default.nix diff --git a/pkgs/development/libraries/libtifiles2/default.nix b/pkgs/development/libraries/libtifiles2/default.nix new file mode 100644 index 00000000000..874cbc87c87 --- /dev/null +++ b/pkgs/development/libraries/libtifiles2/default.nix @@ -0,0 +1,38 @@ +{ stdenv +, lib +, fetchurl +, pkg-config +, autoreconfHook +, glib +, libarchive +, libticonv +}: + +stdenv.mkDerivation rec { + pname = "libtifiles2"; + version = "1.1.7"; + src = fetchurl { + url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; + sha256 = "10n9mhlabmaw3ha5ckllxfy6fygs2pmlmj5v6w5v62bvx54kpils"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + buildInputs = [ + glib + libarchive + libticonv + ]; + + meta = with lib; { + changelog = "http://lpg.ticalc.org/prj_tilp/news.html"; + description = "This library is part of the TiLP framework"; + homepage = "http://lpg.ticalc.org/prj_tilp/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ siraben luc65r ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/pkgs/misc/emulators/tilem/default.nix b/pkgs/misc/emulators/tilem/default.nix index 4948944191b..678919a0867 100644 --- a/pkgs/misc/emulators/tilem/default.nix +++ b/pkgs/misc/emulators/tilem/default.nix @@ -1,17 +1,15 @@ { stdenv , fetchurl , lib -, libarchive , autoreconfHook , pkg-config , glib , libusb1 , darwin , acl -, lzma -, bzip2 , gnome2 , libticonv +, libtifiles2 }: let libticables2 = stdenv.mkDerivation rec { @@ -37,16 +35,6 @@ let ++ lib.optionals stdenv.isLinux [ acl ] ++ lib.optionals stdenv.isDarwin [ darwin.libobjc ]; }; - libtifiles2 = stdenv.mkDerivation rec { - pname = "libtifiles2"; - version = "1.1.7"; - src = fetchurl { - url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; - sha256 = "10n9mhlabmaw3ha5ckllxfy6fygs2pmlmj5v6w5v62bvx54kpils"; - }; - nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ glib libticonv libarchive lzma bzip2 ]; - }; in stdenv.mkDerivation rec { diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index a0619bef6df..f21e7810eaf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15272,6 +15272,8 @@ in libticonv = callPackage ../development/libraries/libticonv { }; + libtifiles2 = callPackage ../development/libraries/libtifiles2 { }; + libtiff = callPackage ../development/libraries/libtiff { }; libtiger = callPackage ../development/libraries/libtiger { }; From 87d7a060c29638fdeb229c69091eb52ae3de9d43 Mon Sep 17 00:00:00 2001 From: luc65r Date: Mon, 26 Oct 2020 22:45:19 +0100 Subject: [PATCH 3/7] libticables2: init at 1.3.5 --- .../libraries/libticables2/default.nix | 64 +++++++++++++++++++ pkgs/misc/emulators/tilem/default.nix | 13 +--- pkgs/top-level/all-packages.nix | 2 + 3 files changed, 67 insertions(+), 12 deletions(-) create mode 100644 pkgs/development/libraries/libticables2/default.nix diff --git a/pkgs/development/libraries/libticables2/default.nix b/pkgs/development/libraries/libticables2/default.nix new file mode 100644 index 00000000000..f22d7b796e1 --- /dev/null +++ b/pkgs/development/libraries/libticables2/default.nix @@ -0,0 +1,64 @@ +{ stdenv +, lib +, fetchurl +, pkg-config +, autoreconfHook +, glib +, libusb1 +}: + +stdenv.mkDerivation rec { + pname = "libticables2"; + version = "1.3.5"; + src = fetchurl { + url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; + sha256 = "08j5di0cgix9vcpdv7b8xhxdjkk9zz7fqfnv3l4apk3jdr8vcvqc"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + buildInputs = [ + libusb1 + glib + ]; + + configureFlags = [ + "--enable-libusb10" + ]; + + postInstall = '' + mkdir -p $out/etc/udev/rules.d + cat > $out/etc/udev/rules.d/69-libsane.rules << EOF + ACTION!="add", GOTO="libticables_end" + + # serial device (assume TI calculator) + KERNEL=="ttyS[0-3]", ENV{ID_PDA}="1" + # parallel device (assume TI calculator) + SUBSYSTEM=="ppdev", ENV{ID_PDA}="1" + # SilverLink + SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e001", ENV{ID_PDA}="1" + # TI-84+ DirectLink + SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e003", ENV{ID_PDA}="1" + # TI-89 Titanium DirectLink + SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e004", ENV{ID_PDA}="1" + # TI-84+ SE DirectLink + SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e008", ENV{ID_PDA}="1" + # TI-Nspire DirectLink + SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="e012", ENV{ID_PDA}="1" + + LABEL="libticables_end" + EOF + ''; + + meta = with lib; { + changelog = "http://lpg.ticalc.org/prj_tilp/news.html"; + description = "This library is part of the TiLP framework"; + homepage = "http://lpg.ticalc.org/prj_tilp/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ siraben luc65r ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/pkgs/misc/emulators/tilem/default.nix b/pkgs/misc/emulators/tilem/default.nix index 678919a0867..fcd37ab24e3 100644 --- a/pkgs/misc/emulators/tilem/default.nix +++ b/pkgs/misc/emulators/tilem/default.nix @@ -4,25 +4,14 @@ , autoreconfHook , pkg-config , glib -, libusb1 , darwin , acl , gnome2 , libticonv , libtifiles2 +, libticables2 }: let - libticables2 = stdenv.mkDerivation rec { - pname = "libticables2"; - version = "1.3.5"; - src = fetchurl { - url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; - sha256 = "08j5di0cgix9vcpdv7b8xhxdjkk9zz7fqfnv3l4apk3jdr8vcvqc"; - }; - nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ glib libusb1 ]; - configureFlags = [ "--enable-libusb10" ]; - }; libticalcs2 = stdenv.mkDerivation rec { pname = "libticalcs2"; version = "1.1.9"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f21e7810eaf..259bfd33284 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15270,6 +15270,8 @@ in libthreadar = callPackage ../development/libraries/libthreadar { }; + libticables2 = callPackage ../development/libraries/libticables2 { }; + libticonv = callPackage ../development/libraries/libticonv { }; libtifiles2 = callPackage ../development/libraries/libtifiles2 { }; From e69bd781e4a93255f164127a71e8238853881ca9 Mon Sep 17 00:00:00 2001 From: luc65r Date: Mon, 26 Oct 2020 22:46:21 +0100 Subject: [PATCH 4/7] libticalcs2: init at 1.1.9 --- .../libraries/libticalcs2/default.nix | 50 +++++++++++++++++++ pkgs/misc/emulators/tilem/default.nix | 18 +------ pkgs/top-level/all-packages.nix | 4 ++ 3 files changed, 55 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/libraries/libticalcs2/default.nix diff --git a/pkgs/development/libraries/libticalcs2/default.nix b/pkgs/development/libraries/libticalcs2/default.nix new file mode 100644 index 00000000000..6eb013a7ffd --- /dev/null +++ b/pkgs/development/libraries/libticalcs2/default.nix @@ -0,0 +1,50 @@ +{ stdenv +, lib +, fetchurl +, pkg-config +, autoreconfHook +, glib +, libticonv +, libtifiles2 +, libticables2 +, lzma +, bzip2 +, acl +, libobjc +}: + +stdenv.mkDerivation rec { + pname = "libticalcs2"; + version = "1.1.9"; + src = fetchurl { + url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; + sha256 = "08c9wgrdnyqcs45mx1bjb8riqq81bzfkhgaijxzn96rhpj40fy3n"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + buildInputs = [ + glib + libticonv + libtifiles2 + libticables2 + lzma + bzip2 + ] ++ lib.optionals stdenv.isLinux [ + acl + ] ++ lib.optionals stdenv.isDarwin [ + libobjc + ]; + + meta = with lib; { + changelog = "http://lpg.ticalc.org/prj_tilp/news.html"; + description = "This library is part of the TiLP framework"; + homepage = "http://lpg.ticalc.org/prj_tilp/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ siraben luc65r ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/pkgs/misc/emulators/tilem/default.nix b/pkgs/misc/emulators/tilem/default.nix index fcd37ab24e3..d2252563d0a 100644 --- a/pkgs/misc/emulators/tilem/default.nix +++ b/pkgs/misc/emulators/tilem/default.nix @@ -1,30 +1,14 @@ { stdenv , fetchurl , lib -, autoreconfHook , pkg-config , glib -, darwin -, acl , gnome2 , libticonv , libtifiles2 , libticables2 +, libticalcs2 }: -let - libticalcs2 = stdenv.mkDerivation rec { - pname = "libticalcs2"; - version = "1.1.9"; - src = fetchurl { - url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; - sha256 = "08c9wgrdnyqcs45mx1bjb8riqq81bzfkhgaijxzn96rhpj40fy3n"; - }; - nativeBuildInputs = [ autoreconfHook pkg-config ]; - buildInputs = [ glib libticables2 libticonv libtifiles2 lzma bzip2 ] - ++ lib.optionals stdenv.isLinux [ acl ] - ++ lib.optionals stdenv.isDarwin [ darwin.libobjc ]; - }; -in stdenv.mkDerivation rec { pname = "tilem"; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 259bfd33284..fa622e4f7cd 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15272,6 +15272,10 @@ in libticables2 = callPackage ../development/libraries/libticables2 { }; + libticalcs2 = callPackage ../development/libraries/libticalcs2 { + inherit (darwin) libobjc; + }; + libticonv = callPackage ../development/libraries/libticonv { }; libtifiles2 = callPackage ../development/libraries/libtifiles2 { }; From 99d0610e03f03dfa9ec9798078da351de694565c Mon Sep 17 00:00:00 2001 From: luc65r Date: Mon, 26 Oct 2020 22:47:06 +0100 Subject: [PATCH 5/7] gfm: init at 1.08 --- .../applications/science/math/gfm/default.nix | 54 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 56 insertions(+) create mode 100644 pkgs/applications/science/math/gfm/default.nix diff --git a/pkgs/applications/science/math/gfm/default.nix b/pkgs/applications/science/math/gfm/default.nix new file mode 100644 index 00000000000..a8031b3e8a3 --- /dev/null +++ b/pkgs/applications/science/math/gfm/default.nix @@ -0,0 +1,54 @@ +{ stdenv +, lib +, fetchurl +, fetchpatch +, pkg-config +, autoreconfHook +, gnome2 +, glib +, libtifiles2 +, libticables2 +, libticalcs2 +, libticonv +}: + +stdenv.mkDerivation rec { + pname = "gfm"; + version = "1.08"; + src = fetchurl { + url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; + sha256 = "0zq1a9mm54zr18dz2mqh79w1a126xwqz6dcrpjlbd1pnmg01l0q9"; + }; + + patches = fetchpatch { + name = "remove-broken-kde-support.patch"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/remove-broken-kde-support.patch?h=gfm"; + sha256 = "03yc8s2avicmv04f2ygg3r3q8l7kpsc94mhp6clp584kmjpjqag5"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + ]; + + buildInputs = [ + gnome2.gtk + gnome2.libglade + glib + libtifiles2 + libticables2 + libticalcs2 + libticonv + ]; + + NIX_CFLAGS_COMPILE = "-I${libticables2}/include/tilp2"; + + meta = with lib; { + changelog = "http://lpg.ticalc.org/prj_tilp/news.html"; + description = "Group File Manager (GFM) allows manipulation of single/group/tigroup files"; + homepage = "http://lpg.ticalc.org/prj_gfm/index.html"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ siraben luc65r ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index fa622e4f7cd..b774958397a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13791,6 +13791,8 @@ in gflags = callPackage ../development/libraries/gflags { }; + gfm = callPackage ../applications/science/math/gfm { }; + gperftools = callPackage ../development/libraries/gperftools { }; grab-site = callPackage ../tools/backup/grab-site { }; From 3c5f402e6e639dbce2cbff114782d2ea5335b7d4 Mon Sep 17 00:00:00 2001 From: luc65r Date: Mon, 26 Oct 2020 22:47:53 +0100 Subject: [PATCH 6/7] tilp2: init at 1.18 --- .../science/math/tilp2/default.nix | 56 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 58 insertions(+) create mode 100644 pkgs/applications/science/math/tilp2/default.nix diff --git a/pkgs/applications/science/math/tilp2/default.nix b/pkgs/applications/science/math/tilp2/default.nix new file mode 100644 index 00000000000..1b46f982b41 --- /dev/null +++ b/pkgs/applications/science/math/tilp2/default.nix @@ -0,0 +1,56 @@ +{ stdenv +, lib +, fetchurl +, fetchpatch +, autoreconfHook +, pkg-config +, intltool +, glib +, gnome2 +, gfm +, libticables2 +, libticalcs2 +, libticonv +, libtifiles2 +}: + +stdenv.mkDerivation rec { + pname = "tilp2"; + version = "1.18"; + src = fetchurl { + url = "mirror://sourceforge/tilp/${pname}-${version}.tar.bz2"; + sha256 = "0isf73bjwk06baz2gm3vpdh600gqck9ca4aqxzb089dmxriv6fkv"; + }; + + patches = fetchpatch { + name = "remove-broken-kde-support.patch"; + url = "https://aur.archlinux.org/cgit/aur.git/plain/remove-broken-kde-support.patch?h=tilp"; + sha256 = "1fn6vh7r45spkwpmkvffkbn7zrcsdrs5mjmspd5rwi3jc12cy3ny"; + }; + + nativeBuildInputs = [ + autoreconfHook + pkg-config + intltool + ]; + + buildInputs = [ + glib + gnome2.gtk + gnome2.libglade + gfm + libticables2 + libticalcs2 + libticonv + libtifiles2 + ]; + + meta = with lib; { + changelog = "http://lpg.ticalc.org/prj_tilp/news.html"; + description = "Transfer data between Texas Instruments graphing calculators and a computer"; + homepage = "http://lpg.ticalc.org/prj_tilp/"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ luc65r ]; + platforms = with platforms; linux ++ darwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index b774958397a..87fd7025991 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -8192,6 +8192,8 @@ in tilem = callPackage ../misc/emulators/tilem { }; + tilp2 = callPackage ../applications/science/math/tilp2 { }; + timemachine = callPackage ../applications/audio/timemachine { }; timelapse-deflicker = callPackage ../applications/graphics/timelapse-deflicker { }; From 1900b6e2d70545cd7f86254e486e2063e2b5644c Mon Sep 17 00:00:00 2001 From: luc65r Date: Mon, 2 Nov 2020 21:18:09 +0100 Subject: [PATCH 7/7] nixos/tilp2: init --- nixos/modules/module-list.nix | 1 + nixos/modules/programs/tilp2.nix | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 nixos/modules/programs/tilp2.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 1ccfba68453..0f8a7ba7904 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -169,6 +169,7 @@ ./programs/sway.nix ./programs/system-config-printer.nix ./programs/thefuck.nix + ./programs/tilp2.nix ./programs/tmux.nix ./programs/traceroute.nix ./programs/tsm-client.nix diff --git a/nixos/modules/programs/tilp2.nix b/nixos/modules/programs/tilp2.nix new file mode 100644 index 00000000000..da9e32e3e6c --- /dev/null +++ b/nixos/modules/programs/tilp2.nix @@ -0,0 +1,28 @@ +{ config, pkgs, lib, ... }: + +with lib; + +let + cfg = config.programs.tilp2; + +in { + options.programs.tilp2 = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Enable tilp2 and udev rules for supported calculators. + ''; + }; + }; + + config = mkIf cfg.enable { + services.udev.packages = [ + pkgs.libticables2 + ]; + + environment.systemPackages = [ + pkgs.tilp2 + ]; + }; +}