"Fix polymc, remove unused files"

This commit is contained in:
SeanOMik 2022-10-05 19:38:05 -04:00
parent 0e85519fc0
commit ee520f849b
Signed by: SeanOMik
GPG Key ID: 568F326C7EB33ACB
6 changed files with 101 additions and 192 deletions

View File

@ -39,6 +39,22 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"git-crypt-agessh": {
"inputs": {
"nixpkgs": [
@ -81,6 +97,22 @@
"type": "github"
}
},
"libnbtplusplus": {
"flake": false,
"locked": {
"lastModified": 1650031308,
"narHash": "sha256-TvVOjkUobYJD9itQYueELJX3wmecvEdCbJ0FinW2mL4=",
"owner": "PolyMC",
"repo": "libnbtplusplus",
"rev": "2203af7eeb48c45398139b583615134efd8d407f",
"type": "github"
},
"original": {
"owner": "PolyMC",
"repo": "libnbtplusplus",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1638587357,
@ -113,6 +145,43 @@
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1658119717,
"narHash": "sha256-4upOZIQQ7Bc4CprqnHsKnqYfw+arJeAuU+QcpjYBXW0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9eb60f25aff0d2218c848dd4574a0ab5e296cabe",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"polymc": {
"inputs": {
"flake-compat": "flake-compat",
"libnbtplusplus": "libnbtplusplus",
"nixpkgs": "nixpkgs_3",
"tomlplusplus": "tomlplusplus"
},
"locked": {
"lastModified": 1664716139,
"narHash": "sha256-oq1Th8mRjGbOgF9PNpPjGyOQv/y51G0jMARBXn0VH/Y=",
"owner": "PolyMC",
"repo": "PolyMC",
"rev": "e3e9e394985e0327efe882d7b4e4c1d6a6cb6491",
"type": "github"
},
"original": {
"owner": "PolyMC",
"repo": "PolyMC",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
@ -120,6 +189,7 @@
"git-crypt-agessh": "git-crypt-agessh",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"polymc": "polymc",
"unstable": "unstable"
}
},
@ -140,6 +210,22 @@
"type": "github"
}
},
"tomlplusplus": {
"flake": false,
"locked": {
"lastModified": 1664034574,
"narHash": "sha256-EFMAl6tsTvkgK0DWC/pZfOIq06b2e5SnxJa1ngGRIQA=",
"owner": "marzer",
"repo": "tomlplusplus",
"rev": "8aa5c8b2a4ff2c440d4630addf64fa4f62146170",
"type": "github"
},
"original": {
"owner": "marzer",
"repo": "tomlplusplus",
"type": "github"
}
},
"unstable": {
"locked": {
"lastModified": 1659131907,

View File

@ -16,11 +16,17 @@
git-crypt-agessh.url = "github:mtoohey31/git-crypt-agessh";
git-crypt-agessh.inputs.nixpkgs.follows = "nixpkgs"; # idk if this is needed
polymc.url = "github:PolyMC/PolyMC";
};
outputs = inputs@{ nixpkgs, unstable, home-manager, agenix, git-crypt-agessh, ... }:
# nixpkgs.overlays = [ inputs.polymc.overlay ];
outputs = inputs@{ nixpkgs, unstable, home-manager, agenix, git-crypt-agessh, polymc, ... }:
let
system = "x86_64-linux";
# nixpkgs.overlays = [ polymc.overlay ];
in
{
# nixpkgs.overlays = [
@ -34,6 +40,8 @@
nixosConfigurations = {
smallinux = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
# nixpkgs.overlays = [ polymc.overlay ];
modules =
let
@ -45,6 +53,9 @@
};
};
in [
{
nixpkgs.overlays = [ polymc.overlay ];
}
# {
# nixpkgs.overlays =
# let

View File

@ -49,7 +49,9 @@
vlc
lutris
unstable.polymc
# unstable.polymc
# (callPackage ../../modules/pkgs/polymc.nix { })
polymc
minecraft
zoom-us
mullvad-vpn

View File

@ -1,83 +0,0 @@
{ lib, stdenv, fetchurl, dpkg, wrapGAppsHook, autoPatchelfHook
, alsa-lib, atk, at-spi2-atk, at-spi2-core, cairo, cups, dbus, expat, fontconfig, freetype
, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid, libX11, libxcb
, libXcomposite, libXcursor, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender
, libXScrnSaver, libXtst, mesa, nspr, nss, openssl, pango, systemd, writeText, runCommandLocal, wget }:
stdenv.mkDerivation rec {
pname = "jellyfin-media-player";
version = "1.7.1";
src = runCommandLocal "${pname}_${version}_amd64-jammy.deb"
rec {
outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = "sha256-g2RldDAvgEpyKz+umxcaAjWfGGH9DZ56UndsIraudFg=";
nativeBuildInputs = [ wget ];
impureEnvVars = lib.fetchers.proxyImpureEnvVars;
} ''
# Figure out certificates
wget --no-check-certificate \
-U "Mozilla/5.0 (X11; Linux x86_64; rv:103.0)" \
https://github.com/jellyfin/jellyfin-media-player/releases/download/v1.7.1/jellyfin-media-player_1.7.1-1_amd64-jammy.deb \
-O $out
'';
nativeBuildInputs = [
dpkg
wrapGAppsHook
autoPatchelfHook
];
buildInputs = [
libcxx systemd libpulseaudio
stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups
dbus expat fontconfig freetype gdk-pixbuf glib gtk3 libdrm libnotify
libuuid libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes
libXi libXrandr libXrender libXScrnSaver libXtst mesa nspr nss pango systemd
];
libPath = lib.makeLibraryPath buildInputs;
dontWrapGApps = true;
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
# curl -i -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0" -O https://upwork-usw2-desktopapp.upwork.com/binaries/v5_6_10_13_3c485d1dd2af4f61/upwork_5.6.10.13_amd64.deb
echo $out
echo $src
dpkg-deb -x "$src" ./
'';
installPhase = ''
runHook preInstall
mv usr $out
# mv share $out
# Now it requires lib{ssl,crypto}.so.1.0.0. Fix based on Spotify pkg.
# https://github.com/NixOS/nixpkgs/blob/efea022d6fe0da84aa6613d4ddeafb80de713457/pkgs/applications/audio/spotify/default.nix#L129
# mkdir -p $out/lib/upwork
# ln -s ${lib.getLib openssl}/lib/libssl.so $out/lib/upwork/libssl.so.1.0.0
# ln -s ${lib.getLib openssl}/lib/libcrypto.so $out/lib/upwork/libcrypto.so.1.0.0
sed -e "s|/opt/jellyfin-media-player|$out/bin|g" -i $out/share/applications/com.github.iwalton3.jellyfin-media-player.desktop
makeWrapper $out/bin/jellyfinmediaplayer \
$out/bin/jellyfinmediaplayer \
--prefix LD_LIBRARY_PATH : ${libPath}
runHook postInstall
'';
meta = with lib; {
description = "Jellyfin Desktop Client based on Plex Media Player";
homepage = "https://github.com/jellyfin/jellyfin-media-player";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.gpl2Only;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ seanomik ];
};
}

View File

@ -1,95 +0,0 @@
{ lib, stdenv, fetchurl, dpkg, wrapGAppsHook, autoPatchelfHook
, alsa-lib, atk, at-spi2-atk, at-spi2-core, cairo, cups, dbus, expat, fontconfig, freetype
, gdk-pixbuf, glib, gtk3, libcxx, libdrm, libnotify, libpulseaudio, libuuid, libX11, libxcb
, libXcomposite, libXcursor, libXdamage, libXext, libXfixes, libXi, libXrandr, libXrender
, libXScrnSaver, libXtst, mesa, nspr, nss, openssl, pango, systemd, writeText, runCommandLocal, wget, cacert }:
stdenv.mkDerivation rec {
pname = "upwork";
version = "5.6.10.13";
# src = unstable.fetchurl {
# url = "https://upwork-usw2-desktopapp.upwork.com/binaries/v5_6_10_13_3c485d1dd2af4f61/upwork_5.6.10.13_amd64.deb";
# sha256 = "c3e1ecf14c99596f434edf93a2e08f031fbaa167025d1280cf19f68b829d6b79";
# curlOpts = "-H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0'";
# curlOptsList = [ "-A" "Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0" "-b" "__cf_bm=sANcdpTto.J0mvbyR.an5GsLDsQCJSXBGYfyjgunudo-1662562397-0-ASEouhG8q62/uasIIliDbQ7FlrOwbWzjRBA4OMbJWiqT4tGLltuGF6Ie+LTxbRSAgz0IN8zEPFwhRvafgX74FBo=; __cfruid=815f8a0964f6a5c305ed144e5e7e2d80cc9f0741-1662562397; visitor_id=206.72.224.198.1662562397138000; restriction_verified=1; device_view=full; _vwo_uuid_v2=DDA36742368E9CD6C22F53461B8FEEABA|50367cf62836a04346162fc4c1163283; _gcl_au=1.1.2059070430.1662562398; _vis_opt_s=1|; _vis_opt_test_cookie=1; _gid=GA1.2.553657708.1662562398; _dc_gtm_UA-62227314-1=1; _dc_gtm_UA-62227314-13=1; _vwo_uuid=DDA36742368E9CD6C22F53461B8FEEABA; _vwo_ds=3$1662562396:53.20652988::; visitor_gql_token=oauth2v2_ab94de76be789a51cba51004ca21879b; _rdt_uuid=1662562398232.17176ea2-719b-40cc-af58-08ead2ba4072; _dpm_ses.5831=*; _fbp=fb.1.1662562398279.1023669369; IR_gbd=upwork.com; _gat_UA-64221313-1=1; __zlcmid=1BqlD286zdYpwIv; _gat_UA-62227314-2=1; OptanonConsent=isGpcEnabled=0&datestamp=Wed+Sep+07+2022+09:53:41+GMT-0500+(Central+Daylight+Time)&version=6.39.0&isIABGlobal=false&hosts=&consentId=3b1a413f-0977-4640-8197-e1a4a70c1aea&interactionCount=1&landingPath=NotLandingPage&groups=C0001:1,C0002:1,C0003:1,C0004:1&AwaitingReconsent=false; _ga_KSM221PNDX=GS1.1.1662562397.1.1.1662562421.0.0.0; _ga=GA1.2.322812467.1662562398; _vwo_sn=0:2; XSRF-TOKEN=d329e97c639af9152d630ae40cfb003b; IR_13634=1662562421585|0|1662562421585||; _dpm_id.5831=af23981a-f6c8-4232-9e05-9b0a33aacac2.1662562398.1.1662562422.1662562398.b8c5ca2e-c751-4c02-a565-8658fa25c9c4; spt=9b1c86d6-d343-47e2-8303-94a9d251d4fb" ];
# curlOpts = "-A Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0";
# };
src = runCommandLocal "upwork_5.6.10.13_amd64.deb"
rec {
# outputHashMode = "recursive";
# outputHashAlgo = "sha256";
# outputHash = "sha256-VEncDEvmNu/nLTG2mQAkvH88HbveO2u3EKUUoGZYrJE";
# downloadUrl = "https://upwork-usw2-desktopapp.upwork.com/binaries/v5_6_10_13_3c485d1dd2af4f61/${pname}_${version}_amd64.deb";
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
nativeBuildInputs = [ wget ];
} ''
# mkdir -p $out
wget -U "Mozilla/5.0 (X11; Linux x86_64; rv:103.0)" "https://upwork-usw2-desktopapp.upwork.com/binaries/v5_6_10_13_3c485d1dd2af4f61/upwork_5.6.10.13_amd64.deb"
# curl -i \
# -H "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8" \
# -H "Accept-Encoding: gzip, deflate, br" \
# -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0" \
# -O https://upwork-usw2-desktopapp.upwork.com/binaries/v5_6_10_13_3c485d1dd2af4f61/upwork_5.6.10.13_amd64.deb
'';
nativeBuildInputs = [
dpkg
wrapGAppsHook
autoPatchelfHook
];
buildInputs = [
libcxx systemd libpulseaudio
stdenv.cc.cc alsa-lib atk at-spi2-atk at-spi2-core cairo cups
dbus expat fontconfig freetype gdk-pixbuf glib gtk3 libdrm libnotify
libuuid libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes
libXi libXrandr libXrender libXScrnSaver libXtst mesa nspr nss pango systemd
];
libPath = lib.makeLibraryPath buildInputs;
dontWrapGApps = true;
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
# curl -i -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:103.0) Gecko/20100101 Firefox/103.0" -O https://upwork-usw2-desktopapp.upwork.com/binaries/v5_6_10_13_3c485d1dd2af4f61/upwork_5.6.10.13_amd64.deb
echo $out
echo $src
dpkg-deb -x "$src" ./
'';
installPhase = ''
runHook preInstall
mv usr $out
mv opt $out
# Now it requires lib{ssl,crypto}.so.1.0.0. Fix based on Spotify pkg.
# https://github.com/NixOS/nixpkgs/blob/efea022d6fe0da84aa6613d4ddeafb80de713457/pkgs/applications/audio/spotify/default.nix#L129
mkdir -p $out/lib/upwork
ln -s ${lib.getLib openssl}/lib/libssl.so $out/lib/upwork/libssl.so.1.0.0
ln -s ${lib.getLib openssl}/lib/libcrypto.so $out/lib/upwork/libcrypto.so.1.0.0
sed -e "s|/opt/Upwork|$out/bin|g" -i $out/share/applications/upwork.desktop
makeWrapper $out/opt/Upwork/upwork \
$out/bin/upwork \
--prefix XDG_DATA_DIRS : "${gtk3}/share/gsettings-schemas/${gtk3.name}/" \
--prefix LD_LIBRARY_PATH : ${libPath}
runHook postInstall
'';
meta = with lib; {
description = "Online freelancing platform desktop application for time tracking";
homepage = "https://www.upwork.com/ab/downloads/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ zakkor wolfangaukang ];
};
}

View File

@ -1,12 +0,0 @@
[Nemo Action]
Active=true
Name=Open in VSCodium
Comment=Opens current folder in VSCodium
Exec=codium %P
Icon-Name=vscodium
Selection=none
Extensions=any;
Quote=double
Dependencies=codium;