diff --git a/hosts/desktopnix/default.nix b/hosts/desktopnix/default.nix index 2c6d896..a973eaf 100644 --- a/hosts/desktopnix/default.nix +++ b/hosts/desktopnix/default.nix @@ -1,7 +1,6 @@ { inputs, lib, - pkgs, ... }: { imports = [ @@ -55,10 +54,6 @@ boot.binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"]; nix.settings.system-features = ["kvm" "nixos-test"]; - # for embedded - services.udev.packages = [pkgs.j-link]; - environment.systemPackages = [pkgs.j-link]; - services.netbird.enable = true; # Do not cleanup nix store to prevent having to rebuild packages onca a month nix.gc.automatic = lib.mkForce false; diff --git a/hosts/patricknix/default.nix b/hosts/patricknix/default.nix index 2bb8552..1e0a013 100644 --- a/hosts/patricknix/default.nix +++ b/hosts/patricknix/default.nix @@ -1,7 +1,6 @@ { inputs, lib, - pkgs, ... }: { imports = [ @@ -54,7 +53,4 @@ }; nixpkgs.hostPlatform = "x86_64-linux"; nix.settings.system-features = ["kvm" "nixos-test"]; - # for embedded - services.udev.packages = [pkgs.j-link]; - environment.systemPackages = [pkgs.j-link]; } diff --git a/pkgs/default.nix b/pkgs/default.nix index 2c324e7..34e1a64 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -7,7 +7,6 @@ actual = super.callPackage ./actual.nix {}; homebox = super.callPackage ./homebox.nix {}; deploy = super.callPackage ./deploy.nix {}; - j-link = super.callPackage ./jlink.nix {}; mongodb-bin = super.callPackage ./mongodb-bin.nix {}; awakened-poe-trade = super.callPackage ./awakened-poe-trade.nix {}; neovim-clean = super.neovim-unwrapped.overrideAttrs (_neovimFinal: neovimPrev: { diff --git a/pkgs/jlink.nix b/pkgs/jlink.nix deleted file mode 100644 index dc48ed0..0000000 --- a/pkgs/jlink.nix +++ /dev/null @@ -1,99 +0,0 @@ -{ - stdenv, - lib, - requireFile, - autoPatchelfHook, - makeWrapper, - copyDesktopItems, - fontconfig, - freetype, - libICE, - libSM, - udev, - libX11, - libXext, - libXcursor, - libXfixes, - libXrender, - libXrandr, -}: let - version = "796f"; - url = "https://www.segger.com/downloads/jlink/JLink_Linux_V${version}_x86_64.tgz"; - hash = "02ahzj6dwxh15bnk2468zidi78vyiyp9v3bkq7rfijmasl73ybhr"; - archiveFilename = "JLink_Linux_V${version}_x86_64.tgz"; -in - stdenv.mkDerivation { - pname = "j-link"; - inherit version; - - src = requireFile { - name = archiveFilename; - url = "https://www.segger.com/downloads/jlink#J-LinkSoftwareAndDocumentationPack"; - sha256 = hash; - }; - - dontConfigure = true; - dontBuild = true; - dontStrip = true; - preferLocalBuild = true; - - nativeBuildInputs = [copyDesktopItems autoPatchelfHook makeWrapper]; - - buildInputs = [ - udev - stdenv.cc.cc.lib - fontconfig - freetype - libICE - libSM - libX11 - libXext - libXcursor - libXfixes - libXrender - libXrandr - ]; - - runtimeDependencies = [udev]; - - installPhase = '' - runHook preInstall - - mkdir -p "$out/lib/JLink" "$out/share/doc" "$out/bin" - - cp -R * "$out/lib/JLink" - rm "$out/lib/JLink/99-jlink.rules" - - for f in "$out/lib/JLink"/J*; do - if [[ -L $f ]]; then - mv "$f" "$out/bin/" - elif [[ -x $f ]]; then - makeWrapper "$f" "$out/bin/$(basename "$f")" - fi - done - - mv "$out/lib/JLink/Doc" "$out/share/doc/JLink" - mv \ - "$out/lib/JLink"/README* \ - "$out/lib/JLink/Samples" \ - "$out/lib/JLink/GDBServer"/Readme* \ - "$out/share/doc/JLink/" - - install -D -t "$out/lib/udev/rules.d" 99-jlink.rules - - runHook postInstall - ''; - - preFixup = '' - patchelf --add-needed libudev.so.1 $out/lib/JLink/libjlinkarm.so - ''; - - meta = with lib; { - homepage = "https://www.segger.com/downloads/jlink"; - description = "SEGGER J-Link"; - license = licenses.unfree; - platforms = platforms.linux; - maintainers = with maintainers; [liff]; - mainProgram = "JLinkExe"; - }; - }