nixpkgs/pkgs/applications/networking/browsers/next/default.nix

96 lines
2.0 KiB
Nix
Raw Normal View History

{ stdenv
, fetchFromGitHub
2019-09-10 20:16:33 +00:00
, lispPackages
, sbcl
, callPackage
2019-09-10 20:16:33 +00:00
}:
let
# This is the wrapped webkitgtk platform port that we hardcode into the Lisp Core.
# See https://github.com/atlas-engineer/next/tree/master/ports#next-platform-ports
next-gtk-webkit = callPackage ./next-gtk-webkit.nix {};
2019-09-10 20:16:33 +00:00
in
stdenv.mkDerivation rec {
pname = "next";
2020-03-09 17:50:34 +00:00
version = "1.5.0";
2019-09-10 20:16:33 +00:00
src = fetchFromGitHub {
owner = "atlas-engineer";
repo = "next";
rev = version;
2020-03-09 17:50:34 +00:00
sha256 = "1gqkp185wcwaxr8py90hqk44nqjblrrdwvig19gizrbzr2gx2zhy";
};
2019-09-10 20:16:33 +00:00
nativeBuildInputs = [
sbcl
] ++ (with lispPackages; [
prove-asdf
trivial-features
]);
2019-09-10 20:16:33 +00:00
buildInputs = with lispPackages; [
alexandria
bordeaux-threads
cl-annot
cl-ansi-text
cl-css
cl-json
cl-markup
cl-ppcre
cl-ppcre-unicode
cl-prevalence
closer-mop
dbus
dexador
ironclad
local-time
log4cl
lparallel
mk-string-metrics
parenscript
2020-02-06 04:18:59 +00:00
plump
quri
2020-02-06 04:18:59 +00:00
serapeum
sqlite
str
swank
trivia
trivial-clipboard
2020-02-06 04:18:59 +00:00
trivial-types
unix-opts
];
2019-10-10 07:39:48 +00:00
# This reference is unfortunately not detected by Nix
propagatedBuildInputs = [ next-gtk-webkit ];
prePatch = ''
substituteInPlace source/ports/gtk-webkit.lisp \
--replace "next-gtk-webkit" "${next-gtk-webkit}/bin/next-gtk-webkit"
'';
2019-09-10 20:16:33 +00:00
buildPhase = ''
common-lisp.sh --eval "(require :asdf)" \
--eval "(asdf:load-asd (truename \"next.asd\") :name \"next\")" \
--eval '(asdf:make :next)' \
--quit
'';
2019-09-10 20:16:33 +00:00
installPhase = ''
install -D -m0755 next $out/bin/next
'';
2019-09-10 20:16:33 +00:00
# Stripping destroys the generated SBCL image
dontStrip = true;
2019-09-10 20:16:33 +00:00
meta = with stdenv.lib; {
description = "Infinitely extensible web-browser (with Lisp development files using WebKitGTK platform port)";
homepage = https://next.atlas.engineer;
license = licenses.bsd3;
maintainers = [ maintainers.lewo ];
platforms = [ "x86_64-linux" ];
};
}