Compare commits

...

2 commits

9 changed files with 74 additions and 3 deletions

View file

@ -26,6 +26,7 @@
formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper); formatter = eachSystem (pkgs: treefmtEval.${pkgs.system}.config.build.wrapper);
nixosModules = import ./modules; nixosModules = import ./modules;
nixosConfigurations = import ./hosts {inherit self inputs;}; nixosConfigurations = import ./hosts {inherit self inputs;};
packages = eachSystem (pkgs: import ./pkgs pkgs);
deploy.nodes = import ./nodes {inherit self inputs;}; deploy.nodes = import ./nodes {inherit self inputs;};
}; };
inputs = { inputs = {

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
inputs,
pkgs,
...
}: {
imports = [ imports = [
./browsers ./browsers
./media ./media
@ -35,5 +39,7 @@
nautilus nautilus
simple-scan simple-scan
entr entr
inputs.self.packages.${pkgs.system}.mcuxpresso.ide
inputs.self.packages.${pkgs.system}.mcuxpresso.config-tools
]; ];
} }

View file

@ -60,6 +60,10 @@
git.enable = true; git.enable = true;
utility = {
vim-wakatime.enable = true;
};
lsp = { lsp = {
enable = true; enable = true;
lspSignature.enable = true; lspSignature.enable = true;

3
pkgs/default.nix Normal file
View file

@ -0,0 +1,3 @@
pkgs: {
mcuxpresso = import ./mcuxpresso pkgs;
}

View file

@ -0,0 +1,3 @@
pkgs: {
ide = pkgs.callPackage ./ide.nix pkgs;
}

44
pkgs/mcuxpresso/ide.nix Normal file
View file

@ -0,0 +1,44 @@
pkgs: let
name = "mcuxpressoide";
version = "24.9.25";
description = "MCUXpresso IDE";
filename = "${name}-${version}.x86_64.deb";
src = pkgs.stdenv.mkDerivation {
inherit version description;
name = "${name}-src";
src = pkgs.requireFile {
url = "https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-integrated-development-environment-ide:MCUXpresso-IDE";
name = "${filename}.bin";
hash = "sha256-e3g7rzZQ1WFLcUakkjaufpHMtw3qkw5lwxJuCKs6L+k=";
};
buildCommand = ''
# Unpack tarball.
mkdir -p deb
sh $src --target deb || true
ar -xv deb/${filename}
tar xfvz data.tar.gz -C .
mkdir -p ./final/eclipse
mv ./usr/local/${name}-${version}/ide/* ./usr/local/${name}-${version}/ide/.* final/eclipse
mv final/eclipse/mcuxpressoide final/eclipse/eclipse
mv final/eclipse/mcuxpressoide.ini final/eclipse/eclipse.ini
# Create custom .eclipseproduct file
rm final/eclipse/.eclipseproduct
echo "name=${name}
id=com.nxp.${name}
version=${version}
" > final/eclipse/.eclipseproduct
# Install udev rules
mkdir -p final/lib/udev/rules.d
mv ./lib/udev/rules.d/56-pemicro.rules ./lib/udev/rules.d/85-mcuxpresso.rules final/lib/udev/rules.d/
# Additional files
mv ./usr/local/${name}-${version}/mcu_data final/mcu_data
cd ./final
tar -czf $out ./
'';
};
mcuxpressoide = pkgs.eclipses.buildEclipse {
name = "${name}-eclipse";
inherit description src;
};
in
mcuxpressoide

View file

@ -7,6 +7,7 @@
"audio" "audio"
"video" "video"
"wheel" "wheel"
"plugdev"
]; ];
}; };
} }

View file

@ -1,6 +1,5 @@
{pkgs, ...}: { {pkgs, ...}: {
nixpkgs = { nixpkgs = {
config.allowUnfree = true;
overlays = [ overlays = [
(_: prev: { (_: prev: {
lib = lib =
@ -10,6 +9,11 @@
}; };
}) })
]; ];
config.permittedInsecurePackages = ["cinny-4.2.2" "cinny-unwrapped-4.2.2"];
config = {
allowUnfree = true;
permittedInsecurePackages = ["cinny-4.2.2" "cinny-unwrapped-4.2.2" "segger-jlink-qt4-796s"];
segger-jlink.acceptLicense = true;
};
}; };
} }

View file

@ -1,3 +1,8 @@
{ {
inputs,
pkgs,
...
}: {
imports = [./docker.nix ./gnupg.nix ./pipewire.nix ./kmscon.nix]; imports = [./docker.nix ./gnupg.nix ./pipewire.nix ./kmscon.nix];
services.udev.packages = [pkgs.segger-jlink inputs.self.packages.${pkgs.system}.mcuxpresso.ide];
} }