diff --git a/lib/default.nix b/lib/default.nix index 50ea6e2..034011f 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,5 +1,7 @@ { ... }: { + maintainers = import ./maintainers.nix; + mkApp = { drv, name ? drv.pname, binPath ? "/bin/${name}" }: { type = "app"; diff --git a/lib/maintainers.nix b/lib/maintainers.nix new file mode 100644 index 0000000..0523da0 --- /dev/null +++ b/lib/maintainers.nix @@ -0,0 +1,8 @@ +{ + L-Nafaryus = { + email = "l.nafaryus@gmail.com"; + github = "L-Nafaryus"; + githubId = 37117584; + name = "George Kusayko"; + }; +} diff --git a/packages/dearpygui/default.nix b/packages/dearpygui/default.nix index 0fb6c5b..619ca5a 100644 --- a/packages/dearpygui/default.nix +++ b/packages/dearpygui/default.nix @@ -1,4 +1,5 @@ { + bonfire, stdenv, lib, pkgs, version ? "1.10.0", sha256 ? "sha256-36GAGfvHZyNZe/Z7o3VrCCwApkZpJ+r2E8+1Hy32G5Q=", ... @@ -54,7 +55,7 @@ pkgs.python3.pkgs.buildPythonPackage { description = "Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies."; license = licenses.mit; platforms = platforms.linux; - maintainers = []; + maintainers = with bonfire.lib.maintainers; [ L-Nafaryus ]; broken = pkgs.stdenv.isDarwin; }; } diff --git a/packages/default.nix b/packages/default.nix index 06a3cc8..9fe0ec1 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -5,19 +5,23 @@ let forAllSystems = nixpkgs.lib.genAttrs [ "x86_64-linux" ]; nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); -in forAllSystems(system: let pkgs = nixpkgsFor.${system}; in { +in forAllSystems(system: + let + bonfire = self; + pkgs = nixpkgsFor.${system}; + in { - example = pkgs.callPackage ./example {}; + example = pkgs.callPackage ./example { inherit bonfire; }; - netgen = pkgs.callPackage ./netgen {}; + netgen = pkgs.callPackage ./netgen { inherit bonfire; }; - dearpygui = pkgs.callPackage ./dearpygui {}; + dearpygui = pkgs.callPackage ./dearpygui { inherit bonfire; }; - openfoam = pkgs.callPackage ./openfoam {}; + openfoam = pkgs.callPackage ./openfoam { inherit bonfire; }; - spoofdpi = pkgs.callPackage ./spoofdpi {}; + spoofdpi = pkgs.callPackage ./spoofdpi { inherit bonfire; }; - lego = pkgs.callPackage ./lego {}; + lego = pkgs.callPackage ./lego { inherit bonfire; }; - ultimmc = pkgs.libsForQt5.callPackage ./ultimmc {}; + ultimmc = pkgs.libsForQt5.callPackage ./ultimmc { inherit bonfire; }; }) diff --git a/packages/example/CMakeLists.txt b/packages/example/CMakeLists.txt deleted file mode 100644 index 4b92884..0000000 --- a/packages/example/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -cmake_minimum_required(VERSION 3.16) - -project(hello-nix LANGUAGES CXX) - -add_executable(hello-nix source/example.cpp) - -install( - TARGETS hello-nix - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime -) diff --git a/packages/example/default.nix b/packages/example/default.nix deleted file mode 100644 index afc3cd0..0000000 --- a/packages/example/default.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ stdenv, lib, pkgs, ... }: -stdenv.mkDerivation { - pname = "example"; - version = "1.0"; - - # local source - src = ./.; - - nativeBuildInputs = with pkgs; [ cmake ninja ]; - - meta = with lib; { - homepage = "https://www.example.org/"; - description = "Example with hello nix."; - license = licenses.cc0; - platforms = platforms.linux; - maintainers = []; - broken = false; - }; -} diff --git a/packages/example/source/example.cpp b/packages/example/source/example.cpp deleted file mode 100644 index 9ea2e3c..0000000 --- a/packages/example/source/example.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include - -int main(void) -{ - std::cout << "Hello Nix!" << std::endl; - - return 0; -} diff --git a/packages/lego/default.nix b/packages/lego/default.nix index 0e52131..6b6a1c5 100644 --- a/packages/lego/default.nix +++ b/packages/lego/default.nix @@ -1,4 +1,5 @@ { + bonfire, lib, fetchFromGitHub, buildGoModule, nixosTests, version ? "c847ac4a4c55d6a5a457f6ef494cf45a47299e01", @@ -30,7 +31,7 @@ buildGoModule rec { description = "Let's Encrypt client and ACME library written in Go"; license = licenses.mit; homepage = "https://go-acme.github.io/lego/"; - maintainers = []; + maintainers = with bonfire.lib.maintainers; [ L-Nafaryus ]; }; passthru.tests.lego = nixosTests.acme; diff --git a/packages/netgen/default.nix b/packages/netgen/default.nix index 03c0eb0..4f2cf32 100644 --- a/packages/netgen/default.nix +++ b/packages/netgen/default.nix @@ -1,9 +1,10 @@ { + bonfire, stdenv, lib, pkgs, version ? "6.2.2402", sha256 ? "sha256-o3cj5k2VtYiGcs9Z9FyfwtOpDlZZlcO3kRgBSer6KAw=", ... }: -stdenv.mkDerivation { +let pkg = stdenv.mkDerivation { pname = "netgen"; inherit version; @@ -52,12 +53,20 @@ stdenv.mkDerivation { metis ]; + passthru = { + shellHook = with pkgs; '' + export PYTHONPATH="${python3}/${python3.sitePackages}" + export PYTHONPATH="$PYTHONPATH:${pkg}/${python3.sitePackages}" + ''; + }; + meta = with pkgs.lib; { homepage = "https://github.com/NGSolve/netgen"; description = "NETGEN is an automatic 3d tetrahedral mesh generator"; license = licenses.lgpl21Only; platforms = platforms.linux; - maintainers = []; + maintainers = with bonfire.lib.maintainers; [ L-Nafaryus ]; broken = pkgs.stdenv.isDarwin; }; -} +}; +in pkg diff --git a/packages/openfoam/default.nix b/packages/openfoam/default.nix index 7a5fe19..c8b8792 100644 --- a/packages/openfoam/default.nix +++ b/packages/openfoam/default.nix @@ -1,4 +1,5 @@ { + bonfire, stdenv, lib, pkgs, version ? "11.20240116", sha256 ? "sha256-bNWlza3cL/lUrwrVEmPECvKbFkwR2rTMaccsn8amGFQ=", ... @@ -8,8 +9,8 @@ let major = lib.elemAt version' 0; revision = lib.elemAt version' 1; realname = "OpenFOAM"; - -in stdenv.mkDerivation { +in +let pkg = stdenv.mkDerivation { pname = "openfoam"; inherit version major; @@ -65,12 +66,19 @@ in stdenv.mkDerivation { cp -Ra $WM_PROJECT_DIR/* $out/${realname}-${major} ''; + passthru = { + shellHook = '' + . ${pkg}/${realname}-${major}/etc/bashrc + ''; + }; + meta = with pkgs.lib; { homepage = "https://www.openfoam.org/"; description = "OpenFOAM is a free, open source CFD software released and developed by OpenFOAM Foundation"; license = licenses.gpl3; platforms = platforms.linux; - maintainers = []; + maintainers = with bonfire.lib.maintainers; [ L-Nafaryus ]; broken = pkgs.stdenv.isDarwin; }; -} +}; +in pkg diff --git a/packages/spoofdpi/default.nix b/packages/spoofdpi/default.nix index 7141a9f..5bb6c1a 100644 --- a/packages/spoofdpi/default.nix +++ b/packages/spoofdpi/default.nix @@ -1,4 +1,5 @@ { + bonfire, lib, pkgs, version ? "0.8", hash ? "sha256-kPCdOZl4m7KBb970TjJokXorKfnCvuV5Uq7lFQIh1z8=", @@ -25,7 +26,7 @@ pkgs.buildGoModule { homepage = "https://github.com/xvzc/SpoofDPI"; description = "A simple and fast anti-censorship tool written in Go"; license = licenses.asl20; - maintainers = []; + maintainers = with bonfire.lib.maintainers; [ L-Nafaryus ]; broken = false; mainProgram = "spoof-dpi"; }; diff --git a/packages/ultimmc/default.nix b/packages/ultimmc/default.nix index 5e3b4c8..fae3f2a 100644 --- a/packages/ultimmc/default.nix +++ b/packages/ultimmc/default.nix @@ -1,4 +1,5 @@ { + bonfire, lib, stdenv, fetchFromGitHub, wrapQtAppsHook, extra-cmake-modules, cmake, @@ -40,6 +41,7 @@ stdenv.mkDerivation rec { cmakeFlags = [ "-DLauncher_LAYOUT=lin-nodeps" ]; +# TODO: fix broken data directory location postInstall = let libpath = with xorg; lib.makeLibraryPath [ libX11 @@ -68,6 +70,6 @@ stdenv.mkDerivation rec { description = "Cracked Minecraft Launcher"; license = licenses.asl20; platforms = platforms.linux; - maintainers = [] ; + maintainers = with bonfire.lib.maintainers; [ L-Nafaryus ]; }; }