mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 22:30:23 +00:00
racket-minimal: fix docs failure for lack of SQLite
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
#lang racket/base
|
||||
(require
|
||||
racket/function
|
||||
racket/list
|
||||
racket/pretty
|
||||
racket/string
|
||||
setup/dirs
|
||||
)
|
||||
|
||||
(define config-file (build-path (find-config-dir) "config.rktd"))
|
||||
|
||||
(define lib-paths
|
||||
((compose remove-duplicates
|
||||
(curry map (curryr string-trim "-L" #:right? #f))
|
||||
(curry filter (curryr string-prefix? "-L"))
|
||||
string-split)
|
||||
(getenv "NIX_LDFLAGS")))
|
||||
|
||||
(define config
|
||||
(let* ([prev-config (read-installation-configuration-table)]
|
||||
[prev-lib-search-dirs (hash-ref prev-config 'lib-search-dirs '(#f))]
|
||||
[lib-search-dirs (remove-duplicates (append lib-paths prev-lib-search-dirs))])
|
||||
(hash-set prev-config 'lib-search-dirs lib-search-dirs)))
|
||||
|
||||
(call-with-output-file config-file
|
||||
#:exists 'replace
|
||||
(curry pretty-write config))
|
||||
@@ -4,8 +4,6 @@
|
||||
fetchurl,
|
||||
racket-minimal,
|
||||
|
||||
openssl,
|
||||
|
||||
cairo,
|
||||
fontconfig,
|
||||
glib,
|
||||
@@ -17,7 +15,6 @@
|
||||
libpng,
|
||||
makeFontsConf,
|
||||
pango,
|
||||
sqlite,
|
||||
unixODBC,
|
||||
wrapGAppsHook3,
|
||||
|
||||
@@ -38,23 +35,6 @@ let
|
||||
|
||||
manifest = lib.importJSON ./manifest.json;
|
||||
inherit (stdenv.hostPlatform) isDarwin;
|
||||
|
||||
runtimeDeps = [
|
||||
openssl
|
||||
];
|
||||
|
||||
mainDistDeps = [
|
||||
(if isDarwin then libiodbc else unixODBC)
|
||||
cairo
|
||||
fontconfig
|
||||
glib
|
||||
gtk3
|
||||
libGL
|
||||
libjpeg
|
||||
libpng
|
||||
pango
|
||||
sqlite
|
||||
];
|
||||
in
|
||||
|
||||
minimal.overrideAttrs (
|
||||
@@ -64,13 +44,25 @@ minimal.overrideAttrs (
|
||||
inherit (manifest.full) sha256;
|
||||
};
|
||||
|
||||
buildInputs = prevAttrs.buildInputs ++ [
|
||||
(if isDarwin then libiodbc else unixODBC)
|
||||
cairo
|
||||
fontconfig.lib
|
||||
glib
|
||||
gtk3
|
||||
libGL
|
||||
libjpeg
|
||||
libpng
|
||||
pango
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
wrapGAppsHook3
|
||||
];
|
||||
|
||||
preBuild =
|
||||
let
|
||||
libPaths = makeLibPaths mainDistDeps;
|
||||
libPaths = makeLibPaths finalAttrs.buildInputs;
|
||||
libPathsVar = if isDarwin then "DYLD_FALLBACK_LIBRARY_PATH" else "LD_LIBRARY_PATH";
|
||||
in
|
||||
/*
|
||||
@@ -92,27 +84,6 @@ minimal.overrideAttrs (
|
||||
gappsWrapperArgs+=("--set" "LOCALE_ARCHIVE" "${glibcLocales}/lib/locale/locale-archive")
|
||||
'';
|
||||
|
||||
postFixup =
|
||||
let
|
||||
libPaths = makeLibPaths (runtimeDeps ++ mainDistDeps);
|
||||
in
|
||||
''
|
||||
$out/bin/racket -f - <<EOF
|
||||
(require setup/dirs)
|
||||
|
||||
(define config-path (build-path (find-config-dir) "config.rktd"))
|
||||
|
||||
(define prev-config (with-input-from-file config-path read))
|
||||
(define prev-lib-search-dirs (hash-ref prev-config 'lib-search-dirs '(#f)))
|
||||
|
||||
(define lib-search-dirs (append '(${libPaths}) prev-lib-search-dirs))
|
||||
(define config (hash-set prev-config 'lib-search-dirs lib-search-dirs))
|
||||
|
||||
(with-output-to-file config-path (thunk (pretty-write config))
|
||||
#:exists 'replace)
|
||||
EOF
|
||||
'';
|
||||
|
||||
passthru =
|
||||
let
|
||||
notUpdated = x: !builtins.isAttrs x || lib.isDerivation x;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
lz4,
|
||||
ncurses,
|
||||
openssl,
|
||||
sqlite,
|
||||
|
||||
disableDocs ? false,
|
||||
|
||||
@@ -35,6 +36,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
libz
|
||||
lz4
|
||||
ncurses
|
||||
openssl
|
||||
sqlite.out
|
||||
];
|
||||
|
||||
patches = lib.optionals isDarwin [
|
||||
@@ -86,22 +89,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
dontStrip = isDarwin;
|
||||
|
||||
postFixup = ''
|
||||
$out/bin/racket -f - <<EOF
|
||||
(require setup/dirs)
|
||||
|
||||
(define config-path (build-path (find-config-dir) "config.rktd"))
|
||||
|
||||
(define prev-config (with-input-from-file config-path read))
|
||||
(define prev-lib-search-dirs (hash-ref prev-config 'lib-search-dirs '(#f)))
|
||||
|
||||
(define lib-search-dirs (append '("${lib.getLib openssl}/lib") prev-lib-search-dirs))
|
||||
(define config (hash-set prev-config 'lib-search-dirs lib-search-dirs))
|
||||
|
||||
(with-output-to-file config-path (thunk (pretty-write config))
|
||||
#:exists 'replace)
|
||||
EOF
|
||||
'';
|
||||
postFixup =
|
||||
let
|
||||
configureInstallation = builtins.path {
|
||||
name = "configure-installation.rkt";
|
||||
path = ./configure-installation.rkt;
|
||||
};
|
||||
in
|
||||
''
|
||||
$out/bin/racket -U -u ${configureInstallation}
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
# Functionalities #
|
||||
|
||||
Reference in New Issue
Block a user