Compare commits
2 Commits
60b228a4d8
...
ba7a9102aa
Author | SHA1 | Date | |
---|---|---|---|
|
ba7a9102aa | ||
|
8680a7e003 |
@ -25,6 +25,7 @@
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
git
|
git
|
||||||
kdePackages.kdeconnect-kde
|
kdePackages.kdeconnect-kde
|
||||||
|
nix-prefetch
|
||||||
];
|
];
|
||||||
programs.home-manager = {
|
programs.home-manager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -1,68 +0,0 @@
|
|||||||
{ lib
|
|
||||||
, mkWindowsAppNoCC
|
|
||||||
, wine
|
|
||||||
, makeDesktopItem
|
|
||||||
, copyDesktopItems
|
|
||||||
}: mkWindowsAppNoCC rec {
|
|
||||||
inherit wine;
|
|
||||||
|
|
||||||
pname = "ecuflash";
|
|
||||||
version = "1.44";
|
|
||||||
version_raw = "1444870";
|
|
||||||
|
|
||||||
src = builtins.fetchurl {
|
|
||||||
sha256 = "sha256-6SQtiIJTD8MgFk8T5BB87/nIYvW9Lmbevb6+SJX/+gs=";
|
|
||||||
url = "https://www.tactrix.com/downloads/ecuflash_1444870_win.exe";
|
|
||||||
};
|
|
||||||
dontUnpack = true;
|
|
||||||
wineArch = "win64";
|
|
||||||
enableInstallNotification = true;
|
|
||||||
|
|
||||||
fileMapDuringAppInstall = false;
|
|
||||||
persistRegistry = true;
|
|
||||||
persistRuntimeLayer = true;
|
|
||||||
inputHashMethod = "store-path";
|
|
||||||
nativeBuildInputs = [ copyDesktopItems ];
|
|
||||||
winAppInstall = ''
|
|
||||||
d="$WINEPREFIX/drive_c/Program Files (x86)/OpenECU/${pname}/"
|
|
||||||
|
|
||||||
mkdir -p "$d"
|
|
||||||
cp ${src} "$d/${pname}_${version_raw}.exe"
|
|
||||||
wine "$WINEPREFIX/drive_c/Program Files (x86)/OpenECU/${pname}/${pname}_${version_raw}.exe"
|
|
||||||
'';
|
|
||||||
winAppPreRun = ''
|
|
||||||
'';
|
|
||||||
winAppRun = ''
|
|
||||||
echo "src: ${src}"
|
|
||||||
ls "$WINEPREFIX/drive_c/Program Files (x86)/OpenECU/${pname}"
|
|
||||||
wine "$WINEPREFIX/drive_c/Program Files (x86)/OpenECU/EcuFlash/${pname}.exe"
|
|
||||||
'';
|
|
||||||
winAppPostRun = "";
|
|
||||||
installPhase = ''
|
|
||||||
runHook preInstall
|
|
||||||
|
|
||||||
ln -s $out/bin/.launcher $out/bin/${pname}
|
|
||||||
|
|
||||||
runHook postInstall
|
|
||||||
'';
|
|
||||||
desktopItems = makeDesktopItem {
|
|
||||||
name = pname;
|
|
||||||
exec = pname;
|
|
||||||
icon = pname;
|
|
||||||
mimeTypes = [ "application/octet-stream" ];
|
|
||||||
desktopName = "EcuFlash";
|
|
||||||
genericName = "ROM Editor";
|
|
||||||
categories = [ "Development" "Electronics" "Java" ];
|
|
||||||
};
|
|
||||||
meta = with lib; {
|
|
||||||
description = "EcuFlash is Tactrix' free software used with the Openport 2.0 to give you the power to tune and reflash many Subaru and Mitsubishi vehicles.";
|
|
||||||
homepage = "https://www.tactrix.com/";
|
|
||||||
license = {
|
|
||||||
url = "https://www.tactrix.com/index.php?option=com_content&view=article&id=79:eula&catid=36:downloads-ecuflash&Itemid=57";
|
|
||||||
free = false;
|
|
||||||
redistributable = true;
|
|
||||||
};
|
|
||||||
maintainers = with maintainers; [ jafner ];
|
|
||||||
platforms = [ "x86_64-linux" ];
|
|
||||||
};
|
|
||||||
}
|
|
1
projects/nix-ecutuner/99-j2534.rules
Normal file
1
projects/nix-ecutuner/99-j2534.rules
Normal file
@ -0,0 +1 @@
|
|||||||
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="0403", ATTR{idProduct}=="cc4d", GROUP="dialout", MODE="0666"
|
@ -1,21 +1,20 @@
|
|||||||
{
|
{
|
||||||
description = "A Nix flake for EcuFlash";
|
description = "A Nix flake with tools for working with ECUs";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||||
erosanix.url = "github:emmanuelrosa/erosanix";
|
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, erosanix }: {
|
outputs = { self, nixpkgs }: {
|
||||||
packages.x86_64-linux = let
|
packages.x86_64-linux = let
|
||||||
pkgs = import "${nixpkgs}" {
|
pkgs = import "${nixpkgs}" {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
};
|
};
|
||||||
in with (pkgs // erosanix.packages.x86_64-linux // erosanix.lib.x86_64-linux); {
|
in with pkgs; {
|
||||||
default = self.packages.x86_64-linux.ecuflash;
|
default = self.packages.x86_64-linux.ecuflash;
|
||||||
|
j2534 = callPackage ./j2534.nix {
|
||||||
ecuflash = callPackage ./ecuflash.nix {
|
inherit libusb1 pkg-config;
|
||||||
inherit mkWindowsAppNoCC;
|
inherit fetchFromGitHub;
|
||||||
wine = wineWowPackages.full;
|
inherit stdenv;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
21
projects/nix-ecutuner/j2534.nix
Normal file
21
projects/nix-ecutuner/j2534.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, libusb1, pkg-config }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "j2534";
|
||||||
|
version = "678252b";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "dschultzca";
|
||||||
|
repo = "j2534";
|
||||||
|
rev = "678252bbd0492f48df5e2d94e89cb5485b76d02f";
|
||||||
|
sha256 = "sha256-V76NtilaKjiT203lX8J0xGG1AZzdZK8Y66hynlQtqW0=";
|
||||||
|
};
|
||||||
|
dontDisableStatic = true;
|
||||||
|
buildInputs = [ libusb1 pkg-config ];
|
||||||
|
buildPhase = {
|
||||||
|
makefile = "j2534/makefile";
|
||||||
|
};
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/lib
|
||||||
|
cp j2534.so $out/lib/${pname}.so
|
||||||
|
install -D ${./99-j2534.rules} $out/lib/udev/rules.d/99-j2534.rules
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user