commit
5fa658968b
@ -0,0 +1,27 @@ |
||||
#!/usr/bin/env nix-shell |
||||
#!nix-shell -i bash -p curl gnused jq |
||||
|
||||
set -x -eu -o pipefail |
||||
|
||||
cd $(dirname "${BASH_SOURCE[0]}") |
||||
|
||||
VERSION_JSON=$(curl --silent https://cef-builds.spotifycdn.com/index.json | jq '[.linux64.versions[] | select (.channel == "stable")][0]') |
||||
|
||||
CEF_VERSION=$(echo ${VERSION_JSON} | jq -r '.cef_version' | cut -d'+' -f1) |
||||
GIT_REVISION=$(echo ${VERSION_JSON} | jq -r '.cef_version' | cut -d'+' -f2 | cut -c 2-) |
||||
CHROMIUM_VERSION=$(echo ${VERSION_JSON} | jq -r '.chromium_version') |
||||
|
||||
SHA256_LINUX64=$(nix-prefetch-url --quiet https://cef-builds.spotifycdn.com/cef_binary_${CEF_VERSION}+g${GIT_REVISION}+chromium-${CHROMIUM_VERSION}_linux64_minimal.tar.bz2) |
||||
SHA256_LINUX32=$(nix-prefetch-url --quiet https://cef-builds.spotifycdn.com/cef_binary_${CEF_VERSION}+g${GIT_REVISION}+chromium-${CHROMIUM_VERSION}_linux32_minimal.tar.bz2) |
||||
SHA256_LINUXARM64=$(nix-prefetch-url --quiet https://cef-builds.spotifycdn.com/cef_binary_${CEF_VERSION}+g${GIT_REVISION}+chromium-${CHROMIUM_VERSION}_linuxarm64_minimal.tar.bz2) |
||||
|
||||
setKV () { |
||||
sed -i "s|$1 = \".*\"|$1 = \"${2:-}\"|" ./default.nix |
||||
} |
||||
|
||||
setKV version ${CEF_VERSION} |
||||
setKV gitRevision ${GIT_REVISION} |
||||
setKV chromiumVersion ${CHROMIUM_VERSION} |
||||
setKV 'platforms."aarch64-linux".sha256' ${SHA256_LINUXARM64} |
||||
setKV 'platforms."i686-linux".sha256' ${SHA256_LINUX32} |
||||
setKV 'platforms."x86_64-linux".sha256' ${SHA256_LINUX64} |
@ -1,21 +0,0 @@ |
||||
{ lib, stdenv, fetchurl, ncurses }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "readline"; |
||||
version = "5.2"; |
||||
|
||||
src = fetchurl { |
||||
url = "mirror://gnu/readline/readline-${version}.tar.gz"; |
||||
sha256 = "0icz4hqqq8mlkwrpczyaha94kns0am9z0mh3a2913kg2msb8vs0j"; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ncurses]; |
||||
|
||||
patches = lib.optional stdenv.isDarwin ./shobj-darwin.patch; |
||||
|
||||
meta = with lib; { |
||||
branch = "5"; |
||||
platforms = platforms.unix; |
||||
license = licenses.gpl2; |
||||
}; |
||||
} |
@ -1,64 +0,0 @@ |
||||
{ fetchurl, lib, stdenv, ncurses |
||||
}: |
||||
|
||||
stdenv.mkDerivation (rec { |
||||
pname = "readline"; |
||||
version = "6.2"; |
||||
|
||||
src = fetchurl { |
||||
url = "mirror://gnu/readline/readline-${version}.tar.gz"; |
||||
sha256 = "10ckm2bd2rkxhvdmj7nmbsylmihw0abwcsnxf8y27305183rd9kr"; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ncurses]; |
||||
|
||||
patchFlags = [ "-p0" ]; |
||||
patches = |
||||
[ ./link-against-ncurses.patch |
||||
./no-arch_only.patch |
||||
./clang.patch |
||||
] |
||||
++ |
||||
(let |
||||
patch = nr: sha256: |
||||
fetchurl { |
||||
url = "mirror://gnu/readline/readline-${version}-patches/readline62-${nr}"; |
||||
inherit sha256; |
||||
}; |
||||
in |
||||
import ./readline-6.2-patches.nix patch); |
||||
|
||||
meta = { |
||||
description = "Library for interactive line editing"; |
||||
|
||||
longDescription = '' |
||||
The GNU Readline library provides a set of functions for use by |
||||
applications that allow users to edit command lines as they are |
||||
typed in. Both Emacs and vi editing modes are available. The |
||||
Readline library includes additional functions to maintain a |
||||
list of previously-entered command lines, to recall and perhaps |
||||
reedit those lines, and perform csh-like history expansion on |
||||
previous commands. |
||||
|
||||
The history facilities are also placed into a separate library, |
||||
the History library, as part of the build process. The History |
||||
library may be used without Readline in applications which |
||||
desire its capabilities. |
||||
''; |
||||
|
||||
homepage = "https://savannah.gnu.org/projects/readline/"; |
||||
|
||||
license = lib.licenses.gpl3Plus; |
||||
|
||||
maintainers = [ ]; |
||||
branch = "6.2"; |
||||
platforms = lib.platforms.unix; |
||||
}; |
||||
} |
||||
|
||||
// |
||||
|
||||
# Don't run the native `strip' when cross-compiling. |
||||
(if stdenv.hostPlatform != stdenv.buildPlatform |
||||
then { dontStrip = true; } |
||||
else { })) |
@ -1,13 +0,0 @@ |
||||
diff --git a/support/shobj-conf b/support/shobj-conf
|
||||
index 5a63e80..4b2a741 100644
|
||||
--- support/shobj-conf
|
||||
+++ support/shobj-conf
|
||||
@@ -189,7 +189,7 @@ darwin*|macosx*)
|
||||
darwin[789]*|darwin10*) SHOBJ_LDFLAGS=''
|
||||
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
;;
|
||||
- *) SHOBJ_LDFLAGS='-dynamic'
|
||||
+ *) SHOBJ_LDFLAGS='-dynamiclib'
|
||||
SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
;;
|
||||
esac
|
@ -1,14 +0,0 @@ |
||||
diff -ru -x '*~' readline-6.2-orig/support/shobj-conf readline-6.2/support/shobj-conf
|
||||
--- support/shobj-conf 2009-10-28 14:20:21.000000000 +0100
|
||||
+++ support/shobj-conf 2014-07-01 13:03:28.000000000 +0200
|
||||
@@ -168,8 +168,8 @@
|
||||
SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
|
||||
SHLIB_LIBSUFF='dylib'
|
||||
|
||||
- SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`'
|
||||
- SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
+ SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup'
|
||||
+ SHLIB_XLDFLAGS='-dynamiclib -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
|
||||
SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
|
||||
;;
|
@ -1,9 +0,0 @@ |
||||
# Automatically generated by `update-patch-set.sh'; do not edit. |
||||
|
||||
patch: [ |
||||
(patch "001" "1qxl74f4n0hv4a807byrgbk4ixd8m50apj3922q2ss9pfi0nra1q") |
||||
(patch "002" "1m670g2xzib6r81315q9r24nh9brmxkpq07acch1fwxmih94jqqy") |
||||
(patch "003" "0x13c9wir4r44v2vdg96y0ahn8kl3wcmb5y0xn15yvid6pzk28fb") |
||||
(patch "004" "0xjlkxfssfsd6jwbqhfjs4hybcps0b9zgz8v86vbhnzag4j39g89") |
||||
(patch "005" "1x61bjl3wgs1gwla9b3y1hh12m1j5qlbis22258mljjl9mg900pg") |
||||
] |
@ -1,11 +0,0 @@ |
||||
--- a/support/shobj-conf.orig 2006-04-11 06:15:43.000000000 -0700
|
||||
+++ b/support/shobj-conf 2007-11-08 01:15:43.000000000 -0800
|
||||
@@ -171,7 +171,7 @@
|
||||
SHLIB_LIBSUFF='dylib'
|
||||
|
||||
case "${host_os}" in
|
||||
- darwin[78]*) SHOBJ_LDFLAGS=''
|
||||
+ darwin[789]*) SHOBJ_LDFLAGS=''
|
||||
SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
|
||||
;;
|
||||
*) SHOBJ_LDFLAGS='-dynamic'
|
@ -0,0 +1,47 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchFromGitHub |
||||
, pycryptodomex |
||||
, pyopenssl |
||||
, pytestCheckHook |
||||
, pythonOlder |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "dsinternals"; |
||||
version = "1.2.4"; |
||||
format = "setuptools"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "p0dalirius"; |
||||
repo = "pydsinternals"; |
||||
rev = version; |
||||
hash = "sha256-C1ar9c4F4WI5ICX7PJe8FzVwK8bxZds+kMBpttEp9Ko="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ |
||||
pyopenssl |
||||
pycryptodomex |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
pytestCheckHook |
||||
]; |
||||
|
||||
pythonImportsCheck = [ |
||||
"dsinternals" |
||||
]; |
||||
|
||||
pytestFlagsArray = [ |
||||
"tests/*.py" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Module to interact with Windows Active Directory"; |
||||
homepage = "https://github.com/p0dalirius/pydsinternals"; |
||||
license = licenses.gpl2Only; |
||||
maintainers = with maintainers; [ fab ]; |
||||
}; |
||||
} |
@ -0,0 +1,49 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchFromGitHub |
||||
, packaging |
||||
, poetry-core |
||||
, pytestCheckHook |
||||
, pythonOlder |
||||
, typing-extensions |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "newversion"; |
||||
version = "1.8.2"; |
||||
format = "pyproject"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "vemel"; |
||||
repo = pname; |
||||
rev = version; |
||||
hash = "sha256-27HWMzSzyAbiOW7OUhlupRWIVJG6DrpXObXmxlCsmxU="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ |
||||
poetry-core |
||||
]; |
||||
|
||||
propagatedBuildInputs = [ |
||||
packaging |
||||
] ++ lib.optionals (pythonOlder "3.8") [ |
||||
typing-extensions |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
pytestCheckHook |
||||
]; |
||||
|
||||
pythonImportsCheck = [ |
||||
"newversion" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "PEP 440 version manager"; |
||||
homepage = "https://github.com/vemel/newversion"; |
||||
license = with licenses; [ mit ]; |
||||
maintainers = with maintainers; [ fab ]; |
||||
}; |
||||
} |
@ -1,71 +0,0 @@ |
||||
{ stdenv, lib, fetchurl, freetype, fontconfig, openssl, unzip }: |
||||
|
||||
let |
||||
platforms = [ "i686-linux" "x86_64-linux" "x86_64-darwin" ]; |
||||
in |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "phantomjs"; |
||||
version = "1.9.8"; |
||||
|
||||
# I chose to use the binary build for now. |
||||
# The source version is quite nasty to compile |
||||
# because it has bundled a lot of external libraries (like QT and Webkit) |
||||
# and no easy/nice way to use the system versions of these |
||||
|
||||
src = if stdenv.hostPlatform.system == "i686-linux" then |
||||
fetchurl { |
||||
url = "https://bitbucket.org/ariya/phantomjs/downloads/${pname}-${version}-linux-i686.tar.bz2"; |
||||
sha256 = "11fzmssz9pqf3arh4f36w06sl2nyz8l9h8iyxyd7w5aqnq5la0j1"; |
||||
} |
||||
else |
||||
if stdenv.hostPlatform.system == "x86_64-linux" then |
||||
fetchurl { |
||||
url = "https://bitbucket.org/ariya/phantomjs/downloads/${pname}-${version}-linux-x86_64.tar.bz2"; |
||||
sha256 = "0fhnqxxsxhy125fmif1lwgnlhfx908spy7fx9mng4w72320n5nd1"; |
||||
} |
||||
else # x86_64-darwin |
||||
fetchurl { |
||||
url = "https://bitbucket.org/ariya/phantomjs/downloads/${pname}-${version}-macosx.zip"; |
||||
sha256 = "0j0aq8dgzmb210xdrh0v3d4nblskl3zsckl8bzf1a603wcx085cg"; |
||||
}; |
||||
|
||||
nativeBuildInputs = lib.optional stdenv.isDarwin unzip; |
||||
|
||||
buildPhase = lib.optionalString (!stdenv.isDarwin) '' |
||||
patchelf \ |
||||
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ |
||||
--set-rpath "${lib.makeLibraryPath [ freetype fontconfig stdenv.cc.cc stdenv.cc.cc openssl ]}" \ |
||||
bin/phantomjs |
||||
''; |
||||
|
||||
dontPatchELF = true; |
||||
dontStrip = true; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out/share/doc/phantomjs |
||||
cp -a bin $out |
||||
cp -a ChangeLog examples LICENSE.BSD README.md third-party.txt $out/share/doc/phantomjs |
||||
''; |
||||
|
||||
meta = { |
||||
description = "Headless WebKit with JavaScript API"; |
||||
longDescription = '' |
||||
PhantomJS is a headless WebKit with JavaScript API. |
||||
It has fast and native support for various web standards: |
||||
DOM handling, CSS selector, JSON, Canvas, and SVG. |
||||
|
||||
PhantomJS is an optimal solution for: |
||||
- Headless Website Testing |
||||
- Screen Capture |
||||
- Page Automation |
||||
- Network Monitoring |
||||
''; |
||||
|
||||
homepage = "https://phantomjs.org/"; |
||||
license = lib.licenses.bsd3; |
||||
|
||||
maintainers = [ lib.maintainers.bluescreen303 ]; |
||||
inherit platforms; |
||||
}; |
||||
} |
Loading…
Reference in new issue