some changes

This commit is contained in:
tx0 2025-03-14 18:19:04 +05:00
parent f0529eed85
commit 0d25462616
4 changed files with 42 additions and 21 deletions

View file

@ -846,29 +846,13 @@
"url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
} }
}, },
"nixpkgs-master": {
"locked": {
"lastModified": 1738943717,
"narHash": "sha256-KabzClxx6dREJyxZ+gffuBL1us/ZOcFJ8ZjgNtlM6yU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a503a26038e1f3e868bb67269c1e96d169de1374",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "master",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1738940519, "lastModified": 1741951773,
"narHash": "sha256-WXGiqZn8u+ynRzIywjwF6eVR38DSVvQCVqjZ6sHQMe8=", "narHash": "sha256-OGEqTkGdx9MUENEPwU3NSKHECKt0ObW3GaD8L9zgMSw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b30cff4b9ac9dcf891534791fc92f2f425a80454", "rev": "b5a00ebfb32ff0480ad90a213cfed6938ef04920",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -3838,7 +3822,6 @@
"hyprland": "hyprland", "hyprland": "hyprland",
"nix-index-database": "nix-index-database", "nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-stable": "nixpkgs-stable", "nixpkgs-stable": "nixpkgs-stable",
"nur": "nur", "nur": "nur",
"nvf": "nvf", "nvf": "nvf",

View file

@ -35,6 +35,8 @@
users.tx0 = import ./home; users.tx0 = import ./home;
extraSpecialArgs = {inherit system inputs u;}; extraSpecialArgs = {inherit system inputs u;};
}; };
nixpkgs.overlays = [(import ./overlays/spotx.nix)];
} }
]; ];
}; };
@ -48,7 +50,6 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/release-24.11"; nixpkgs-stable.url = "github:nixos/nixpkgs/release-24.11";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
nur = { nur = {
url = "github:nix-community/NUR"; url = "github:nix-community/NUR";

View file

@ -70,6 +70,7 @@
pinta pinta
hoppscotch hoppscotch
jetbrains.pycharm-community-bin jetbrains.pycharm-community-bin
spotify
# de # de
hyprpaper hyprpaper

36
overlays/spotx.nix Normal file
View file

@ -0,0 +1,36 @@
final: prev: let
spotx = prev.fetchurl {
url = "https://raw.githubusercontent.com/SpotX-Official/SpotX-Bash/21481cea97bac720590c2aad8b1fc2c58c9ec8f9/spotx.sh";
hash = "sha256-1k1sEEnT1SE6RAWrfd1qFY1gFrUVNh7zUQJLu3DODlU=";
};
in {
spotify = prev.spotify.overrideAttrs (old: {
nativeBuildInputs =
old.nativeBuildInputs
++ (with prev; [
util-linux
perl
unzip
zip
curl
]);
unpackPhase =
builtins.replaceStrings ["runHook postUnpack"] [
''
patchShebangs --build ${spotx}
runHook postUnpack
''
]
old.unpackPhase;
installPhase =
builtins.replaceStrings ["runHook postInstall"] [
''
bash ${spotx} -f -P "$out/share/spotify"
runHook postInstall
''
]
old.installPhase;
});
}