diff --git a/configuration.nix b/configuration.nix index eb8495f..e2f1aee 100644 --- a/configuration.nix +++ b/configuration.nix @@ -231,8 +231,9 @@ in programs.nix-ld = { enable = true; - libraries = options.programs.nix-ld.libraries.default ++ ( - with pkgs; [ + libraries = + options.programs.nix-ld.libraries.default + ++ (with pkgs; [ dbus # libdbus-1.so.3 fontconfig # libfontconfig.so.1 freetype # libfreetype.so.6 @@ -241,8 +242,7 @@ in libxkbcommon # libxkbcommon.so.0 libx11 # libX11.so.6 wayland - ] - ); + ]); }; services.pipewire = { diff --git a/flake.nix b/flake.nix index 36da0c3..378252e 100644 --- a/flake.nix +++ b/flake.nix @@ -60,7 +60,7 @@ { nixpkgs.overlays = [ (final: prev: { - samrewritten = final.callPackage ./package.nix {}; + samrewritten = final.callPackage ./package.nix { }; }) yazi.overlays.default millennium.overlays.default diff --git a/package.nix b/package.nix deleted file mode 100644 index 5cdf679..0000000 --- a/package.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - lib, - rustPlatform, - fetchFromGitHub, - nix-update-script, - # Deps - gdk-pixbuf, - glib, - graphene, - gtk4, - openssl, - pango, - pkg-config, - wrapGAppsHook4, -}: -rustPlatform.buildRustPackage (finalAttrs: { - pname = "samrewritten"; - version = "1.4.5"; - - src = fetchFromGitHub { - owner = "PaulCombal"; - repo = "SamRewritten"; - tag = "v${finalAttrs.version}"; - hash = "sha256-sSZC7yN/WuMYkdcPmHyvasaWRFzppSxmlS1bYLZGvyM="; - }; - - cargoHash = "sha256-YKiICPP6z9lZWqdoPOYRq+0mmz7jY3/eJd7XzN8Vmnk="; - - # Tests require network access and a running Steam client. Skipping. - doCheck = false; - - nativeBuildInputs = [ - glib - pkg-config - wrapGAppsHook4 - ]; - - buildInputs = [ - gdk-pixbuf - glib - graphene - gtk4 - openssl - pango - ]; - - postInstall = '' - install -Dm644 assets/org.samrewritten.SamRewritten.gschema.xml \ - $out/share/glib-2.0/schemas/org.samrewritten.SamRewritten.gschema.xml - glib-compile-schemas $out/share/glib-2.0/schemas - cat package/samrewritten.desktop - substituteInPlace package/samrewritten.desktop \ - --replace-fail "Exec=/usr/bin/samrewritten" "Exec=samrewritten" - install -Dm644 package/samrewritten.desktop \ - $out/share/applications/samrewritten.desktop - ''; - - env.PKG_CONFIG_PATH = "${openssl.dev}/lib/pkgconfig"; - - passthru.updateScript = nix-update-script { }; - - meta = { - description = "Modern Steam achievements manager for Windows and Linux"; - mainProgram = "samrewritten"; - homepage = "https://github.com/PaulCombal/SamRewritten"; - changelog = "https://github.com/PaulCombal/SamRewritten/releases"; - license = lib.licenses.gpl3Only; - maintainers = with lib.maintainers; [ ludovicopiero ]; - platforms = [ "x86_64-linux" ]; - }; -}) diff --git a/pkgs/cpuid-fault-emulation/default.nix b/pkgs/cpuid-fault-emulation/default.nix index b0e46d1..f98194e 100644 --- a/pkgs/cpuid-fault-emulation/default.nix +++ b/pkgs/cpuid-fault-emulation/default.nix @@ -1,28 +1,28 @@ { stdenv, kernel }: - + stdenv.mkDerivation { pname = "cpuid_fault_emulation"; version = "0.1"; - + src = ./source; - + nativeBuildInputs = kernel.moduleBuildDependencies; hardeningDisable = [ "pic" "format" ]; - + # Patch the hardcoded host paths to point into the Nix store postPatch = '' substituteInPlace Makefile \ --replace '/lib/modules/$(KERNEL)/build' '${kernel.dev}/lib/modules/${kernel.modDirVersion}/build' \ --replace '$(shell uname -r)' '${kernel.modDirVersion}' ''; - + installPhase = '' install -D cpuid_fault_emulation.ko \ $out/lib/modules/${kernel.modDirVersion}/extra/cpuid_fault_emulation.ko ''; - + meta.platforms = [ "x86_64-linux" ]; }