From d3d384fdb849589c9c34b7057d93012fadb16545 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Wed, 3 May 2023 16:22:42 +0200 Subject: [PATCH] added dirty jmri package --- flake.lock | 6 ++--- flake.nix | 3 ++- hosts/nuc/modules/hydra/default.nix | 2 +- pkgs/dracula-icon-theme/default.nix | 2 +- pkgs/jmri/default.nix | 42 +++++++++++++++++++++++++++++ 5 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 pkgs/jmri/default.nix diff --git a/flake.lock b/flake.lock index d974029..3233213 100644 --- a/flake.lock +++ b/flake.lock @@ -46,11 +46,11 @@ ] }, "locked": { - "lastModified": 1683062158, - "narHash": "sha256-gLan/SNan9YfhuL8v83Uoo9j755l7GOPTqXd9FtMdko=", + "lastModified": 1683108321, + "narHash": "sha256-XIRvYgJl0vIr00HhFN0cQK6zwcuww74DSq0wJSdijPA=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "2e28e88dfdca3d836c5dbedb916e0f629fc6a540", + "rev": "5a3c1449194aa70d5eacbd902fa99cc1b2910a30", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index cc8188b..b8db1a4 100644 --- a/flake.nix +++ b/flake.nix @@ -78,7 +78,8 @@ , ... }@attrs: { packages.x86_64-linux.default = self.nixosConfigurations.iso.config.system.build.isoImage; - hydraJobs.x86_64-linux.default = self.packages.x86_64-linux.default; + packages.x86_64-linux.jmri = nixpkgs.legacyPackages.x86_64-linux.callPackage ./pkgs/jmri { }; + hydraJobs.x86_64-linux = self.packages.x86_64-linux; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; nixosConfigurations = { thinkpad = nixpkgs.lib.nixosSystem { diff --git a/hosts/nuc/modules/hydra/default.nix b/hosts/nuc/modules/hydra/default.nix index b273dd4..120e60e 100644 --- a/hosts/nuc/modules/hydra/default.nix +++ b/hosts/nuc/modules/hydra/default.nix @@ -8,7 +8,7 @@ in port = 4000; hydraURL = domain; notificationSender = "hydra@localhost"; - buildMachinesFiles = []; + buildMachinesFiles = [ ]; useSubstitutes = true; }; diff --git a/pkgs/dracula-icon-theme/default.nix b/pkgs/dracula-icon-theme/default.nix index a5b9597..41c22e6 100644 --- a/pkgs/dracula-icon-theme/default.nix +++ b/pkgs/dracula-icon-theme/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchFromGitHub}: +{ lib, stdenv, fetchFromGitHub }: let themeName = "Dracula"; diff --git a/pkgs/jmri/default.nix b/pkgs/jmri/default.nix new file mode 100644 index 0000000..391d6ec --- /dev/null +++ b/pkgs/jmri/default.nix @@ -0,0 +1,42 @@ +{ stdenv, fetchFromGitHub, lib, ant, jdk, ... }: +stdenv.mkDerivation rec { + pname = "jmri"; + version = "v5.3.5"; + + src = fetchFromGitHub { + owner = "jmri"; + repo = "jmri"; + rev = version; + hash = "sha256-q3p9G16KhUjC3uUazNFDzAeKFIWu2BTds/Q1yhtSqPc="; + }; + + nativeBuildInputs = [ + ant + jdk + ]; + + + buildPhase = '' + ant package-linux + ''; + + installPhase = '' + mkdir -p $out + cp -r dist/Linux/JMRI/* $out + # cp -r dist/Linux/JMRI/lib $out + # mkdir -p $out/bin + # cp dist/Linux/JMRI/PanelPro $out + # cp dist/Linux/JMRI/SoundPro $out/bin + # cp dist/Linux/JMRI/JmriFaceless $out/bin + # mkdir -p $out/lib + # cp -r dist/Linux/JMRI/lib/* $out/ + ''; + + meta = with lib; { + homepage = "https://jmri.org"; + description = "The Java Model Railroad Interface"; + license = licenses.gpl2; + platforms = platforms.linux; + maintainers = with maintainers; [ therealr5 ]; + }; +}