From 65326c9f465c68e9aec670cc0c8f3b84984184d7 Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Fri, 27 Oct 2023 05:19:15 +0000 Subject: [PATCH] Remove unused custom packages --- externals/packages/avarice/default.nix | 26 ------- externals/packages/dptx-dummy/.gitignore | 1 - externals/packages/dptx-dummy/default.nix | 26 ------- externals/packages/dptx-dummy/src/Makefile | 1 - .../packages/dptx-dummy/src/dptx-dummy.c | 6 -- externals/packages/fujproj/default.nix | 24 ------- externals/packages/hll2300d/default.nix | 72 ------------------- externals/packages/jlink/version.json | 2 +- .../packages/weechat-matrix-rs/default.nix | 33 --------- flake.lock | 24 +++---- flake.nix | 11 ++- sets/fpga.nix | 1 - 12 files changed, 22 insertions(+), 205 deletions(-) delete mode 100644 externals/packages/avarice/default.nix delete mode 100644 externals/packages/dptx-dummy/.gitignore delete mode 100644 externals/packages/dptx-dummy/default.nix delete mode 100644 externals/packages/dptx-dummy/src/Makefile delete mode 100644 externals/packages/dptx-dummy/src/dptx-dummy.c delete mode 100644 externals/packages/fujproj/default.nix delete mode 100644 externals/packages/hll2300d/default.nix delete mode 100644 externals/packages/weechat-matrix-rs/default.nix diff --git a/externals/packages/avarice/default.nix b/externals/packages/avarice/default.nix deleted file mode 100644 index 9c72d7d..0000000 --- a/externals/packages/avarice/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ lib, stdenv, fetchurl, perl, libbfd, libusb-compat-0_1, hidapi }: - -stdenv.mkDerivation rec { - pname = "avarice"; - version = "2.14"; - src = fetchurl { - url = - "mirror://sourceforge/project/avarice/avarice/avarice-${version}/avarice-${version}.tar.bz2"; - sha256 = "1ab2pxnkbw501iv1i9z9nj7hfzz4y7hid4l4q58cifm3aw17skjb"; - }; - - nativeBuildInputs = [ perl ]; - buildInputs = [ libbfd libusb-compat-0_1 hidapi ]; - prePatch = '' - find src -type f -name '*.cc' -exec sed -i "s@ __unused@@g" {} \; - ''; - - meta = with lib; { - homepage = "http://avarice.sourceforge.net/"; - description = - "A program to facilitate AVR debugging using an Atmel or AVR ICE"; - license = licenses.gpl2; - platforms = platforms.unix; - maintainers = [ maintainers.artemist ]; - }; -} diff --git a/externals/packages/dptx-dummy/.gitignore b/externals/packages/dptx-dummy/.gitignore deleted file mode 100644 index e31b50d..0000000 --- a/externals/packages/dptx-dummy/.gitignore +++ /dev/null @@ -1 +0,0 @@ -*.cmd diff --git a/externals/packages/dptx-dummy/default.nix b/externals/packages/dptx-dummy/default.nix deleted file mode 100644 index f3dbe5c..0000000 --- a/externals/packages/dptx-dummy/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ stdenv, lib, kernel }: - -stdenv.mkDerivation rec { - pname = "dptx-dummy"; - version = "0.1"; - src = ./src; - nativeBuildInputs = kernel.moduleBuildDependencies; - setSourceRoot = '' - export sourceRoot=$(pwd)/src; - ''; - makeFlags = [ - "-C" - "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" - "M=$(sourceRoot)" - ]; - buildFlags = [ "modules" ]; - installFlags = [ "INSTALL_MOD_PATH=${placeholder "out"}" ]; - installTargets = [ "modules_install" ]; - meta = with lib; { - description = "Dummy module that requires rockchip/dptx.bin"; - homepage = "https://artem.ist"; - license = licenses.gpl2; - maintainers = [ maintainers.artemist ]; - platforms = platforms.linux; - }; -} diff --git a/externals/packages/dptx-dummy/src/Makefile b/externals/packages/dptx-dummy/src/Makefile deleted file mode 100644 index f7d027e..0000000 --- a/externals/packages/dptx-dummy/src/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-m := dptx-dummy.o diff --git a/externals/packages/dptx-dummy/src/dptx-dummy.c b/externals/packages/dptx-dummy/src/dptx-dummy.c deleted file mode 100644 index bf319af..0000000 --- a/externals/packages/dptx-dummy/src/dptx-dummy.c +++ /dev/null @@ -1,6 +0,0 @@ -#include - -MODULE_LICENSE("GPL"); -MODULE_AUTHOR("Artemis Tosini "); -MODULE_DESCRIPTION("Dummy module that requires rockchip/dptx.bin"); -MODULE_FIRMWARE("rockchip/dptx.bin"); diff --git a/externals/packages/fujproj/default.nix b/externals/packages/fujproj/default.nix deleted file mode 100644 index 52a522c..0000000 --- a/externals/packages/fujproj/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ stdenv, lib, fetchFromGitHub, cmake, pkg-config, libusb1, libftdi1 }: - -stdenv.mkDerivation rec { - pname = "fujprog"; - version = "4.8"; - - src = fetchFromGitHub { - owner = "kost"; - repo = pname; - rev = "v${version}"; - sha256 = "08kzkzd5a1wfd1aycywdynxh3qy6n7z9i8lihkahmb4xac3chmz5"; - }; - - nativeBuildInputs = [ cmake pkg-config ]; - buildInputs = [ libftdi1 libusb1 ]; - - meta = with lib; { - description = "FPGA JTAG programmer for ULX2/3S boards"; - homepage = "https://github.com/kost/fujprog"; - license = licenses.bsd2; - platforms = platforms.linux; - maintainers = with maintainers; [ artemist ]; - }; -} diff --git a/externals/packages/hll2300d/default.nix b/externals/packages/hll2300d/default.nix deleted file mode 100644 index 0db0524..0000000 --- a/externals/packages/hll2300d/default.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ stdenv, lib, fetchurl, cups, dpkg, gnused, makeWrapper, ghostscript, file -, a2ps, coreutils, gawk, perl, gnugrep, which }: -let - version = "3.2.0-1"; - lprdeb = fetchurl { - url = - "https://download.brother.com/welcome/dlf101900/hll2300dlpr-${version}.i386.deb"; - sha256 = "093ya7qykhk8mnbiwz1wy0qly66mmk0ghd1rgla25biask5nnmwv"; - }; - - cupsdeb = fetchurl { - url = - "https://download.brother.com/welcome/dlf101901/hll2300dcupswrapper-${version}.i386.deb"; - sha256 = "1fylsbnxbljh517lbdr3324jsi4fwhbfh6gzrdvifg0wl20vfwqr"; - }; - -in stdenv.mkDerivation { - name = "cups-brother-hll2300dw"; - - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ cups ghostscript dpkg a2ps ]; - - dontUnpack = true; - - installPhase = '' - mkdir -p $out - dpkg-deb -x ${cupsdeb} $out - dpkg-deb -x ${lprdeb} $out - - substituteInPlace $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D \ - --replace /opt "$out/opt" \ - --replace /usr/bin/perl ${perl}/bin/perl \ - --replace "BR_PRT_PATH =~" "BR_PRT_PATH = \"$out/opt/brother/Printers/HLL2300D/\"; #" \ - --replace "PRINTER =~" "PRINTER = \"HLL2300D\"; #" - - patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - $out/opt/brother/Printers/HLL2300D/lpd/brprintconflsr3 - patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ - $out/opt/brother/Printers/HLL2300D/lpd/rawtobr3 - - for f in \ - $out/opt/brother/Printers/HLL2300D/cupswrapper/brother_lpdwrapper_HLL2300D \ - $out/opt/brother/Printers/HLL2300D/cupswrapper/paperconfigml1 \ - ; do - wrapProgram $f \ - --prefix PATH : ${ - lib.makeBinPath [ coreutils ghostscript gnugrep gnused ] - } - done - - mkdir -p $out/lib/cups/filter/ - ln -s $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D $out/lib/cups/filter/brother_lpdwrapper_HLL2300D - - mkdir -p $out/share/cups/model - ln -s $out/opt/brother/Printers/HLL2300D/cupswrapper/brother-HLL2300D-cups-en.ppd $out/share/cups/model/ - - wrapProgram $out/opt/brother/Printers/HLL2300D/lpd/filter_HLL2300D \ - --prefix PATH ":" ${ - lib.makeBinPath [ ghostscript a2ps file gnused gnugrep coreutils which ] - } - ''; - - meta = with lib; { - homepage = "http://www.brother.com/"; - description = "Brother hl-l2300dw printer driver"; - license = licenses.unfree; - platforms = platforms.linux; - downloadPage = - "https://support.brother.com/g/b/downloadlist.aspx?c=de&lang=de&prod=hll2300d_us_eu_as&os=128&flang=English"; - maintainers = [ maintainers.artemist ]; - }; -} diff --git a/externals/packages/jlink/version.json b/externals/packages/jlink/version.json index e7b5911..27538ab 100644 --- a/externals/packages/jlink/version.json +++ b/externals/packages/jlink/version.json @@ -1 +1 @@ -{"x86_64-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792d_x86_64.tgz", "version": "7.92d", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-G46nq135PAp4xYu1BJEtgZ1bF+n2DsaHPMmbOXHdvgY="}, "i686-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792d_i686.tgz", "version": "7.92d", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-Neh1ifv3l3mpmxFvH4FEj5T6bnn5LuafRO9CVtA0fww="}, "armv7l-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792d_arm.tgz", "version": "7.92d", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-Lp3ffshRbB5dzgei4dyxlH5iyDTrDwR/yNq4NigVajg="}, "aarch64-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792d_arm64.tgz", "version": "7.92d", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-XacF5u7LF1a50eYJ5czUIQ+bjbmfZXu3XjxrWZwPPNw="}} \ No newline at end of file +{"x86_64-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792m_x86_64.tgz", "version": "7.92m", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-BuLwiszQfdQJdTdMUbOqflYG4zU3HHMDf+JejvIQkps="}, "i686-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792m_i686.tgz", "version": "7.92m", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-QOdjOlBGqKKuOzYpKE2p6P1mBimXzxE2oKB0iWbp440="}, "armv7l-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792m_arm.tgz", "version": "7.92m", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-KUpP6aNh7e3HA/X3Mov3nz3didcKMUaIAaFA5cYd2Kg="}, "aarch64-linux": {"url": "https://www.segger.com/downloads/jlink/JLink_Linux_V792m_arm64.tgz", "version": "7.92m", "curlOpts": "-d accept_license_agreement=accepted -d submit=Download+software", "hash": "sha256-hF3cBCRDRwvVudafOFFdD0pEIjoYWjiJtVz7vgtclx8="}} \ No newline at end of file diff --git a/externals/packages/weechat-matrix-rs/default.nix b/externals/packages/weechat-matrix-rs/default.nix deleted file mode 100644 index 55ff13a..0000000 --- a/externals/packages/weechat-matrix-rs/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ stdenv, lib, rustPlatform, fetchFromGitHub, pkg-config, cmake, openssl -, llvmPackages, weechat }: - -rustPlatform.buildRustPackage rec { - pname = "weechat-matrix-rs"; - version = "20210530"; - - src = fetchFromGitHub { - owner = "poljar"; - repo = pname; - rev = "a846e76b7abf9b70fbcbf955255f99fde185b9cb"; - sha256 = "1gx5vxc8391i8cr6d8r6gwywypl0zn3d1xjydg6y6228qcxl3vmm"; - }; - - cargoSha256 = "0ikarh474dmbbmg6nz24fap6dqgxg0hy2kp3jpknaz8rgdvjsvjb"; - - WEECHAT_PLUGIN_FILE = "${weechat}/include/weechat/weechat-plugin.h"; - LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; - nativeBuildInputs = [ pkg-config cmake llvmPackages.clang ]; - buildInputs = [ openssl ]; - - preFixup = '' - mkdir -p $out/lib/weechat/plugins - mv $out/lib/libmatrix.so $out/lib/weechat/plugins/matrix.so - ''; - - meta = with lib; { - description = "Rust rewrite of the python weechat-matrix script."; - homepage = "https://github.com/poljar/weechat-matrix-rs"; - license = licenses.mit; - matinainers = [ maintainers.artemist ]; - }; -} diff --git a/flake.lock b/flake.lock index 0f1eb87..55a70ce 100644 --- a/flake.lock +++ b/flake.lock @@ -201,11 +201,11 @@ ] }, "locked": { - "lastModified": 1698162493, - "narHash": "sha256-Zehw3cWiTXGGlDDjzTgIX1BhWG+049D/RcSMAiypAcM=", + "lastModified": 1698250431, + "narHash": "sha256-qs2gTeH4wpnWPO6Oi6sOhp2IhG0i0DzcnrJxIY3/CP8=", "owner": "nix-community", "repo": "home-manager", - "rev": "14b54157201fd574b0fa1b3ce7394c9d3a87fbc1", + "rev": "09587fbbc6a669f7725613e044c2577dc5d43ab5", "type": "github" }, "original": { @@ -280,11 +280,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1697723726, - "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", + "lastModified": 1698134075, + "narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", + "rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4", "type": "github" }, "original": { @@ -338,11 +338,11 @@ "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1698063089, - "narHash": "sha256-fJRcsO+KHf0K04fRHIS6HETJRWMakTNbUaWx8WeYHX4=", + "lastModified": 1698328085, + "narHash": "sha256-32Vk8PCa57B4mIXdVTbDrKoHBO5FTm5ZaSwiph9PwIo=", "owner": "nix-community", "repo": "nixvim", - "rev": "0c5dcb56d105addedd001f043e6a32ab9f1abe92", + "rev": "e1138cda396c7b925989cf6158496787051cf3f7", "type": "github" }, "original": { @@ -390,11 +390,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1697746376, - "narHash": "sha256-gu77VkgdfaHgNCVufeb6WP9oqFLjwK4jHcoPZmBVF3E=", + "lastModified": 1698227354, + "narHash": "sha256-Fi5H9jbaQLmLw9qBi/mkR33CoFjNbobo5xWdX4tKz1Q=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "8cc349bfd082da8782b989cad2158c9ad5bd70fd", + "rev": "bd38df3d508dfcdff52cd243d297f218ed2257bf", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 62a6891..7cdd87f 100644 --- a/flake.nix +++ b/flake.nix @@ -71,7 +71,14 @@ modules = [ ./system/mistmane ]; }; } // utils.lib.eachDefaultSystem (system: - let pkgs = import nixpkgs { inherit system; }; - in { formatter = pkgs.nixfmt; }); + let + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + in { + formatter = pkgs.nixfmt; + packages = { jlink = pkgs.callPackage ./externals/packages/jlink { }; }; + }); } diff --git a/sets/fpga.nix b/sets/fpga.nix index 471b1e3..e40dfc1 100644 --- a/sets/fpga.nix +++ b/sets/fpga.nix @@ -18,6 +18,5 @@ tinyprog wishbone-tool openfpgaloader - (callPackage ../externals/packages/fujproj { }) ]; }