update too much

This commit is contained in:
2026-06-27 21:36:14 +02:00
parent edaa68912d
commit 2bb2ab4afc
12 changed files with 284 additions and 73 deletions
+6
View File
@@ -0,0 +1,6 @@
if has nix_direnv_version; then
watch_file modules/flake/shell.nix
# now we want to load the flake environment
use flake
fi
+15
View File
@@ -0,0 +1,15 @@
### Nix template
# Ignore build outputs from performing a nix-build or `nix build` command
result
result-*
# Ignore the configuration folder for Jetbrains IDEs
.idea/
# Development environment
.direnv/
# Disable vm outputs that are called when starting a vm in this directory
*.qcow
*.qcow2
+27
View File
@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1778869304,
"narHash": "sha256-30sZNZoA1cqF5JNO9fVX+wgiQYjB7HJqqJ4ztCDeBZE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d233902339c02a9c334e7e593de68855ad26c4cb",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
+30
View File
@@ -0,0 +1,30 @@
{
description = "Xaiya's packaged packages";
inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
outputs =
{ self, nixpkgs }:
let
systems = nixpkgs.lib.systems.flakeExposed;
forAllSystems =
function:
nixpkgs.lib.genAttrs systems (
system: function (
import nixpkgs {
inherit system;
config.allowUnfree = true;
}
)
);
in {
packages = forAllSystems (pkgs: {
discord-music-presence = pkgs.callPackage ./pkgs/discord-music-presence.nix { };
});
devShells = forAllSystems (pkgs: {
default = pkgs.callPackage ./shell.nix { };
});
};
}
@@ -0,0 +1,79 @@
{
lib,
fetchurl,
stdenv,
xkeyboard_config,
wayland,
libGL,
openssl,
cacert,
fontconfig,
freetype,
libgpg-error,
e2fsprogs,
autoPatchelfHook,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "musicpresence";
version = "2.3.5";
src = fetchurl {
url = "https://github.com/ungive/discord-music-presence/releases/download/v${version}/${pname}-${version}-linux-x86_64.tar.gz";
hash = "sha256-BDgM1SfyEXC0oW+J33mYKwqRrvZX3cy/X9k7Yuk4kS8=";
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
buildInputs = [
stdenv.cc.cc
xkeyboard_config # ARGG
wayland
libGL
openssl
cacert
fontconfig
freetype
libgpg-error
e2fsprogs
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share
cp -r usr/* $out
substituteInPlace $out/share/applications/${pname}.desktop \
--replace-fail Exec=${pname} Exec=$out/bin/${pname}
runHook postInstall
'';
postFixup = ''
wrapProgram $out/bin/${pname} \
--set XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb \
--set SSL_CERT_FILE ${cacert}/etc/ssl/certs/ca-bundle.crt \
--set OPENSSL_CONF ${openssl.out}/etc/ssl/openssl.cnf \
'';
meta = {
description = "The Discord music status that works with any media player";
homepage = "https://github.com/ungive/discord-music-presence";
license = lib.licenses.unfreeRedistributable;
maintainers = with lib.maintainers; [ ];
mainProgram = "musicpresence";
};
}
+12
View File
@@ -0,0 +1,12 @@
{
mkShell,
callPackage,
}:
let
defaultPackage = callPackage ./pkgs/discord-music-presence.nix { };
in
mkShell {
inputsFrom = [ defaultPackage ];
packages = [ ];
}