remove: embeded

This commit is contained in:
Patrick 2024-07-08 16:22:38 +02:00
parent 759668ce84
commit 8f51b05f0b
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
4 changed files with 0 additions and 109 deletions

View file

@ -1,7 +1,6 @@
{ {
inputs, inputs,
lib, lib,
pkgs,
... ...
}: { }: {
imports = [ imports = [
@ -55,10 +54,6 @@
boot.binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"]; boot.binfmt.emulatedSystems = ["aarch64-linux" "riscv64-linux"];
nix.settings.system-features = ["kvm" "nixos-test"]; nix.settings.system-features = ["kvm" "nixos-test"];
# for embedded
services.udev.packages = [pkgs.j-link];
environment.systemPackages = [pkgs.j-link];
services.netbird.enable = true; services.netbird.enable = true;
# Do not cleanup nix store to prevent having to rebuild packages onca a month # Do not cleanup nix store to prevent having to rebuild packages onca a month
nix.gc.automatic = lib.mkForce false; nix.gc.automatic = lib.mkForce false;

View file

@ -1,7 +1,6 @@
{ {
inputs, inputs,
lib, lib,
pkgs,
... ...
}: { }: {
imports = [ imports = [
@ -54,7 +53,4 @@
}; };
nixpkgs.hostPlatform = "x86_64-linux"; nixpkgs.hostPlatform = "x86_64-linux";
nix.settings.system-features = ["kvm" "nixos-test"]; nix.settings.system-features = ["kvm" "nixos-test"];
# for embedded
services.udev.packages = [pkgs.j-link];
environment.systemPackages = [pkgs.j-link];
} }

View file

@ -7,7 +7,6 @@
actual = super.callPackage ./actual.nix {}; actual = super.callPackage ./actual.nix {};
homebox = super.callPackage ./homebox.nix {}; homebox = super.callPackage ./homebox.nix {};
deploy = super.callPackage ./deploy.nix {}; deploy = super.callPackage ./deploy.nix {};
j-link = super.callPackage ./jlink.nix {};
mongodb-bin = super.callPackage ./mongodb-bin.nix {}; mongodb-bin = super.callPackage ./mongodb-bin.nix {};
awakened-poe-trade = super.callPackage ./awakened-poe-trade.nix {}; awakened-poe-trade = super.callPackage ./awakened-poe-trade.nix {};
neovim-clean = super.neovim-unwrapped.overrideAttrs (_neovimFinal: neovimPrev: { neovim-clean = super.neovim-unwrapped.overrideAttrs (_neovimFinal: neovimPrev: {

View file

@ -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";
};
}