commit
46b42d9734
@ -1,68 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, dpkg, alsa-lib, atk, cairo, cups, dbus, expat, fontconfig |
||||
, freetype, gdk-pixbuf, glib, gnome2, gtk2, nspr, nss, pango, udev, xorg }: |
||||
let |
||||
fullPath = lib.makeLibraryPath [ |
||||
alsa-lib |
||||
atk |
||||
cairo |
||||
cups |
||||
dbus |
||||
expat |
||||
fontconfig |
||||
freetype |
||||
gdk-pixbuf |
||||
glib |
||||
gnome2.GConf |
||||
gtk2 |
||||
nspr |
||||
nss |
||||
pango |
||||
udev |
||||
xorg.libX11 |
||||
xorg.libXScrnSaver |
||||
xorg.libXcomposite |
||||
xorg.libXcursor |
||||
xorg.libXdamage |
||||
xorg.libXext |
||||
xorg.libXfixes |
||||
xorg.libXi |
||||
xorg.libXrandr |
||||
xorg.libXrender |
||||
xorg.libXtst |
||||
xorg.libxcb |
||||
] + ":${stdenv.cc.cc.lib}/lib64"; |
||||
in |
||||
stdenv.mkDerivation rec { |
||||
version = "1.17.82"; |
||||
pname = "stride"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://packages.atlassian.com/stride-apt-client/pool/stride_${version}_amd64.deb"; |
||||
sha256 = "0lx61gdhw0kv4f9fwbfg69yq52dsp4db7c4li25d6wn11qanzqhy"; |
||||
}; |
||||
|
||||
dontBuild = true; |
||||
dontFixup = true; |
||||
|
||||
buildInputs = [ dpkg ]; |
||||
|
||||
unpackPhase = '' |
||||
dpkg-deb -x ${src} ./ |
||||
''; |
||||
|
||||
installPhase ='' |
||||
mkdir "$out" |
||||
mv usr/* "$out/" |
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath "${fullPath}:\$ORIGIN" \ |
||||
"$out/bin/stride" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "Desktop client for Atlassian Stride"; |
||||
homepage = "https://www.stride.com/"; |
||||
license = licenses.unfree; |
||||
platforms = [ "x86_64-linux" ]; |
||||
maintainers = with maintainers; [ puffnfresh ]; |
||||
}; |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,49 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchPypi |
||||
, importlib-resources |
||||
, importlib-metadata |
||||
, iso3166 |
||||
, pycountry |
||||
, pytestCheckHook |
||||
, pytest-cov |
||||
, pythonOlder |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "schwifty"; |
||||
version = "2022.6.0"; |
||||
format = "pyproject"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "sha256-MekF96K8IPjop5764Oq6ZcvKJOTc1Qg/gV5Dz2iacBk="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ |
||||
iso3166 |
||||
pycountry |
||||
] ++ lib.optionals (pythonOlder "3.8") [ |
||||
importlib-resources |
||||
] ++ lib.optionals (pythonOlder "3.7") [ |
||||
importlib-metadata |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
pytest-cov |
||||
pytestCheckHook |
||||
]; |
||||
|
||||
pythonImportsCheck = [ |
||||
"schwifty" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Validate/generate IBANs and BICs"; |
||||
homepage = "https://github.com/mdomke/schwifty"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ milibopp ]; |
||||
}; |
||||
} |
@ -1,15 +0,0 @@ |
||||
{ lib, buildGoPackage, fetchFromGitHub }: |
||||
|
||||
buildGoPackage rec { |
||||
pname = "gotags"; |
||||
version = "unstable-2015-08-03"; |
||||
|
||||
goPackagePath = "github.com/jstemmer/gotags"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "jstemmer"; |
||||
repo = "gotags"; |
||||
rev = "be986a34e20634775ac73e11a5b55916085c48e7"; |
||||
sha256 = "sha256-Su7AA6HCdeZai8+yRSKzlrgXvsSEgrXGot2ABRL2PBw="; |
||||
}; |
||||
} |
@ -1,143 +0,0 @@ |
||||
{ stdenv, lib, fetchurl, makeWrapper, file, getopt |
||||
, gtk2, gtk3, gdk-pixbuf, glib, libGL, libGLU, nss, nspr, udev, tbb |
||||
, alsa-lib, GConf, cups, libcap, fontconfig, freetype, pango |
||||
, cairo, dbus, expat, zlib, libpng12, nodejs, gnutar, gcc, gcc_32bit |
||||
, libX11, libXcursor, libXdamage, libXfixes, libXrender, libXi |
||||
, libXcomposite, libXext, libXrandr, libXtst, libSM, libICE, libxcb, chromium |
||||
, libpqxx, libselinux, pciutils, libpulseaudio |
||||
}: |
||||
|
||||
let |
||||
libPath64 = lib.makeLibraryPath [ |
||||
gcc.cc gtk2 gdk-pixbuf glib libGL libGLU nss nspr |
||||
alsa-lib GConf cups libcap fontconfig freetype pango |
||||
cairo dbus expat zlib libpng12 udev tbb |
||||
libX11 libXcursor libXdamage libXfixes libXrender libXi |
||||
libXcomposite libXext libXrandr libXtst libSM libICE libxcb |
||||
libpqxx gtk3 |
||||
|
||||
libselinux pciutils libpulseaudio |
||||
]; |
||||
libPath32 = lib.makeLibraryPath [ gcc_32bit.cc ]; |
||||
binPath = lib.makeBinPath [ nodejs gnutar ]; |
||||
|
||||
ver = "2018.3.0"; |
||||
build = "f2"; |
||||
|
||||
in stdenv.mkDerivation { |
||||
pname = "unity-editor"; |
||||
version = "${ver}x${build}"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://beta.unity3d.com/download/6e9a27477296/LinuxEditorInstaller/Unity.tar.xz"; |
||||
sha256 = "10gppnqacs1qzahj077nkcgbfz2lryd0dxnfcmvyc64xpxnj9nlk"; |
||||
}; |
||||
|
||||
nosuidLib = ./unity-nosuid.c; |
||||
|
||||
nativeBuildInputs = [ makeWrapper file getopt ]; |
||||
|
||||
outputs = [ "out" ]; |
||||
|
||||
sourceRoot = "."; |
||||
|
||||
buildPhase = '' |
||||
cd Editor |
||||
|
||||
$CC -fPIC -shared -o libunity-nosuid.so $nosuidLib -ldl |
||||
strip libunity-nosuid.so |
||||
|
||||
cd .. |
||||
''; |
||||
|
||||
installPhase = '' |
||||
unitydir="$out/opt/Unity/Editor" |
||||
mkdir -p $unitydir |
||||
mv Editor/* $unitydir |
||||
ln -sf /run/wrappers/bin/${chromium.sandboxExecutableName} $unitydir/chrome-sandbox |
||||
|
||||
mkdir -p $out/bin |
||||
makeWrapper $unitydir/Unity $out/bin/unity-editor \ |
||||
--prefix LD_LIBRARY_PATH : "${libPath64}" \ |
||||
--prefix LD_PRELOAD : "$unitydir/libunity-nosuid.so" \ |
||||
--prefix PATH : "${binPath}" |
||||
''; |
||||
|
||||
preFixup = '' |
||||
patchFile() { |
||||
ftype="$(file -b "$1")" |
||||
if [[ "$ftype" =~ LSB\ .*dynamically\ linked ]]; then |
||||
if [[ "$ftype" =~ 32-bit ]]; then |
||||
rpath="${libPath32}" |
||||
intp="$(cat $NIX_CC/nix-support/dynamic-linker-m32)" |
||||
else |
||||
rpath="${libPath64}" |
||||
intp="$(cat $NIX_CC/nix-support/dynamic-linker)" |
||||
fi |
||||
|
||||
# Save origin-relative parts of rpath. |
||||
originRpath="$(patchelf --print-rpath "$1" | sed "s/:/\n/g" | grep "^\$ORIGIN" | paste -sd ":" - || echo "")" |
||||
rpath="$originRpath:$rpath" |
||||
|
||||
patchelf --set-rpath "$rpath" "$1" |
||||
patchelf --set-interpreter "$intp" "$1" 2> /dev/null || true |
||||
fi |
||||
} |
||||
|
||||
upm_linux=$unitydir/Data/Resources/PackageManager/Server/UnityPackageManager |
||||
|
||||
|
||||
orig_size=$(stat --printf=%s $upm_linux) |
||||
|
||||
# Exclude PlaybackEngines to build something that can be run on FHS-compliant Linuxes |
||||
find $unitydir -name PlaybackEngines -prune -o -type f -print | while read path; do |
||||
patchFile "$path" |
||||
done |
||||
|
||||
new_size=$(stat --printf=%s $upm_linux) |
||||
|
||||
###### zeit-pkg fixing starts here. |
||||
# we're replacing plaintext js code that looks like |
||||
# PAYLOAD_POSITION = '1234 ' | 0 |
||||
# [...] |
||||
# PRELUDE_POSITION = '1234 ' | 0 |
||||
# ^-----20-chars-----^^------22-chars------^ |
||||
# ^-- grep points here |
||||
# |
||||
# var_* are as described above |
||||
# shift_by seems to be safe so long as all patchelf adjustments occur |
||||
# before any locations pointed to by hardcoded offsets |
||||
|
||||
var_skip=20 |
||||
var_select=22 |
||||
shift_by=$(expr $new_size - $orig_size) |
||||
|
||||
function fix_offset { |
||||
# $1 = name of variable to adjust |
||||
location=$(grep -obUam1 "$1" $upm_linux | cut -d: -f1) |
||||
location=$(expr $location + $var_skip) |
||||
value=$(dd if=$upm_linux iflag=count_bytes,skip_bytes skip=$location \ |
||||
bs=1 count=$var_select status=none) |
||||
value=$(expr $shift_by + $value) |
||||
echo -n $value | dd of=$upm_linux bs=1 seek=$location conv=notrunc |
||||
} |
||||
|
||||
fix_offset PAYLOAD_POSITION |
||||
fix_offset PRELUDE_POSITION |
||||
''; |
||||
|
||||
dontStrip = true; |
||||
dontPatchELF = true; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://unity3d.com/"; |
||||
description = "Game development tool"; |
||||
longDescription = '' |
||||
Popular development platform for creating 2D and 3D multiplatform games |
||||
and interactive experiences. |
||||
''; |
||||
license = licenses.unfree; |
||||
platforms = [ "x86_64-linux" ]; |
||||
maintainers = with maintainers; [ tesq0 ]; |
||||
}; |
||||
} |
@ -1,32 +0,0 @@ |
||||
#define _GNU_SOURCE |
||||
|
||||
#include <stdio.h> |
||||
#include <string.h> |
||||
#include <sys/stat.h> |
||||
#include <unistd.h> |
||||
#include <dlfcn.h> |
||||
|
||||
static const char sandbox_path[] = "/chrome-sandbox"; |
||||
|
||||
int __xstat(int ver, const char* path, struct stat* stat_buf) { |
||||
static int (*original_xstat)(int, const char*, struct stat*) = NULL; |
||||
if (original_xstat == NULL) { |
||||
int (*fun)(int, const char*, struct stat*) = dlsym(RTLD_NEXT, "__xstat"); |
||||
if (fun == NULL) { |
||||
return -1; |
||||
}; |
||||
original_xstat = fun; |
||||
}; |
||||
|
||||
int res = (*original_xstat)(ver, path, stat_buf); |
||||
if (res == 0) { |
||||
char* pos = strstr(path, sandbox_path); |
||||
if (pos != NULL && *(pos + sizeof(sandbox_path) - 1) == '\0') { |
||||
printf("Lying about chrome-sandbox access rights...\n"); |
||||
stat_buf->st_uid = 0; |
||||
stat_buf->st_gid = 0; |
||||
stat_buf->st_mode = 0104755; |
||||
}; |
||||
} |
||||
return res; |
||||
} |
@ -1,12 +1,12 @@ |
||||
{ buildPackages, fetchurl, perl, buildLinux, nixosTests, stdenv, ... } @ args: |
||||
|
||||
buildLinux (args // rec { |
||||
version = "4.9.317"; |
||||
version = "4.9.318"; |
||||
extraMeta.branch = "4.9"; |
||||
extraMeta.broken = stdenv.isAarch64; |
||||
|
||||
src = fetchurl { |
||||
url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; |
||||
sha256 = "06qdqcplslnp1ncaqvp5yjr294rz3x4qrxnv522v76awj6dkd8vy"; |
||||
sha256 = "09czsc0ynyw068yczs9qx4cliqmrh5hvz93c77lhh014wn02pba4"; |
||||
}; |
||||
} // (args.argsOverride or {})) |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue