commit
859c2499fb
@ -0,0 +1,27 @@ |
|||||||
|
#!/usr/bin/env nix-shell |
||||||
|
#!nix-shell -i bash -p curl gnused nix coreutils |
||||||
|
|
||||||
|
set -euo pipefail |
||||||
|
|
||||||
|
DOCKER=$(curl -s https://raw.githubusercontent.com/odoo/docker/master/15.0/Dockerfile) |
||||||
|
|
||||||
|
get_var() { |
||||||
|
echo "$DOCKER" | grep -E "^[A-Z][A-Z][A-Z] ODOO_$1" | sed -r "s|^[A-Z]{3} ODOO_$1.||g" |
||||||
|
} |
||||||
|
|
||||||
|
VERSION=$(get_var VERSION) |
||||||
|
RELEASE=$(get_var RELEASE) |
||||||
|
|
||||||
|
latestVersion="$VERSION.$RELEASE" |
||||||
|
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; odoo.version or (lib.getVersion odoo)" | tr -d '"') |
||||||
|
|
||||||
|
if [[ "$currentVersion" == "$latestVersion" ]]; then |
||||||
|
echo "odoo is up-to-date: $currentVersion" |
||||||
|
exit 0 |
||||||
|
fi |
||||||
|
|
||||||
|
cd "$(dirname "${BASH_SOURCE[0]}")" |
||||||
|
|
||||||
|
sed -ri "s| sha256.+ # odoo| sha256 = \"$(nix-prefetch-url --type sha256 "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.tar.gz")\"; # odoo|g" default.nix |
||||||
|
sed -ri "s| odoo_version.+| odoo_version = \"$VERSION\";|" default.nix |
||||||
|
sed -ri "s| odoo_release.+| odoo_release = \"$RELEASE\";|" default.nix |
@ -1 +1 @@ |
|||||||
WGET_ARGS=( https://download.kde.org/stable/release-service/22.04.0/src -A '*.tar.xz' ) |
WGET_ARGS=( https://download.kde.org/stable/release-service/22.04.1/src -A '*.tar.xz' ) |
||||||
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,82 @@ |
|||||||
|
/* |
||||||
|
|
||||||
|
# New packages |
||||||
|
|
||||||
|
READ THIS FIRST |
||||||
|
|
||||||
|
This module is for the MauiKit framework and official Maui applications. All |
||||||
|
available packages are listed in `callPackage ./srcs.nix`, although some are not yet |
||||||
|
packaged in Nixpkgs. |
||||||
|
|
||||||
|
IF YOUR PACKAGE IS NOT LISTED IN `callPackage ./srcs.nix`, IT DOES NOT GO HERE. |
||||||
|
|
||||||
|
See also `pkgs/applications/kde` as this is what this is based on. |
||||||
|
|
||||||
|
# Updates |
||||||
|
|
||||||
|
1. Update the URL in `callPackage ./fetch.sh`. |
||||||
|
2. Run `callPackage ./maintainers/scripts/fetch-kde-qt.sh pkgs/applications/maui` |
||||||
|
from the top of the Nixpkgs tree. |
||||||
|
3. Use `nixpkgs-review wip` to check that everything builds. |
||||||
|
4. Commit the changes and open a pull request. |
||||||
|
|
||||||
|
*/ |
||||||
|
|
||||||
|
{ lib |
||||||
|
, libsForQt5 |
||||||
|
, fetchurl |
||||||
|
}: |
||||||
|
|
||||||
|
let |
||||||
|
minQtVersion = "5.15"; |
||||||
|
broken = lib.versionOlder libsForQt5.qtbase.version minQtVersion; |
||||||
|
|
||||||
|
mirror = "mirror://kde"; |
||||||
|
srcs = import ./srcs.nix { inherit fetchurl mirror; }; |
||||||
|
|
||||||
|
mkDerivation = args: |
||||||
|
let |
||||||
|
inherit (args) pname; |
||||||
|
inherit (srcs.${pname}) src version; |
||||||
|
mkDerivation = |
||||||
|
libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {}; |
||||||
|
in |
||||||
|
mkDerivation (args // { |
||||||
|
inherit pname version src; |
||||||
|
|
||||||
|
outputs = args.outputs or [ "out" ]; |
||||||
|
|
||||||
|
meta = |
||||||
|
let meta = args.meta or {}; in |
||||||
|
meta // { |
||||||
|
homepage = meta.homepage or "https://mauikit.org/"; |
||||||
|
platforms = meta.platforms or lib.platforms.linux; |
||||||
|
broken = meta.broken or broken; |
||||||
|
}; |
||||||
|
}); |
||||||
|
|
||||||
|
packages = self: with self; |
||||||
|
let |
||||||
|
callPackage = self.newScope { |
||||||
|
inherit mkDerivation; |
||||||
|
}; |
||||||
|
in { |
||||||
|
# libraries |
||||||
|
mauikit = callPackage ./mauikit.nix { }; |
||||||
|
mauikit-accounts = callPackage ./mauikit-accounts.nix { }; |
||||||
|
mauikit-filebrowsing = callPackage ./mauikit-filebrowsing.nix { }; |
||||||
|
mauikit-imagetools = callPackage ./mauikit-imagetools.nix { }; |
||||||
|
mauikit-texteditor = callPackage ./mauikit-texteditor.nix { }; |
||||||
|
|
||||||
|
# applications |
||||||
|
buho = callPackage ./buho.nix { }; |
||||||
|
clip = callPackage ./clip.nix { }; |
||||||
|
communicator = callPackage ./communicator.nix { }; |
||||||
|
index = callPackage ./index.nix { }; |
||||||
|
nota = callPackage ./nota.nix { }; |
||||||
|
pix = callPackage ./pix.nix { }; |
||||||
|
shelf = callPackage ./shelf.nix { }; |
||||||
|
vvave = callPackage ./vvave.nix { }; |
||||||
|
}; |
||||||
|
|
||||||
|
in lib.makeScope libsForQt5.newScope packages |
@ -0,0 +1 @@ |
|||||||
|
WGET_ARGS=( https://download.kde.org/stable/maui/ -A '*-2.1.2.tar.xz' ) |
@ -0,0 +1,36 @@ |
|||||||
|
{ lib |
||||||
|
, mkDerivation |
||||||
|
, cmake |
||||||
|
, extra-cmake-modules |
||||||
|
, kconfig |
||||||
|
, kio |
||||||
|
, mauikit |
||||||
|
, qtlocation |
||||||
|
, exiv2 |
||||||
|
, kquickimageedit |
||||||
|
}: |
||||||
|
|
||||||
|
mkDerivation { |
||||||
|
pname = "mauikit-imagetools"; |
||||||
|
|
||||||
|
nativeBuildInputs = [ |
||||||
|
cmake |
||||||
|
extra-cmake-modules |
||||||
|
]; |
||||||
|
|
||||||
|
buildInputs = [ |
||||||
|
kconfig |
||||||
|
kio |
||||||
|
mauikit |
||||||
|
qtlocation |
||||||
|
exiv2 |
||||||
|
kquickimageedit |
||||||
|
]; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
homepage = "https://invent.kde.org/maui/mauikit-imagetools"; |
||||||
|
description = "MauiKit Image Tools Components"; |
||||||
|
license = licenses.lgpl21Plus; |
||||||
|
maintainers = with maintainers; [ onny ]; |
||||||
|
}; |
||||||
|
} |
@ -0,0 +1,52 @@ |
|||||||
|
{ lib |
||||||
|
, mkDerivation |
||||||
|
, cmake |
||||||
|
, extra-cmake-modules |
||||||
|
, applet-window-buttons |
||||||
|
, karchive |
||||||
|
, kcoreaddons |
||||||
|
, ki18n |
||||||
|
, kio |
||||||
|
, kirigami2 |
||||||
|
, mauikit |
||||||
|
, mauikit-filebrowsing |
||||||
|
, mauikit-imagetools |
||||||
|
, qtmultimedia |
||||||
|
, qtquickcontrols2 |
||||||
|
, qtlocation |
||||||
|
, exiv2 |
||||||
|
, kquickimageedit |
||||||
|
}: |
||||||
|
|
||||||
|
mkDerivation { |
||||||
|
pname = "pix"; |
||||||
|
|
||||||
|
nativeBuildInputs = [ |
||||||
|
cmake |
||||||
|
extra-cmake-modules |
||||||
|
]; |
||||||
|
|
||||||
|
buildInputs = [ |
||||||
|
applet-window-buttons |
||||||
|
karchive |
||||||
|
kcoreaddons |
||||||
|
ki18n |
||||||
|
kio |
||||||
|
kirigami2 |
||||||
|
mauikit |
||||||
|
mauikit-filebrowsing |
||||||
|
mauikit-imagetools |
||||||
|
qtmultimedia |
||||||
|
qtquickcontrols2 |
||||||
|
qtlocation |
||||||
|
exiv2 |
||||||
|
kquickimageedit |
||||||
|
]; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "Image gallery application"; |
||||||
|
homepage = "https://invent.kde.org/maui/pix"; |
||||||
|
license = licenses.gpl3Plus; |
||||||
|
maintainers = with maintainers; [ onny ]; |
||||||
|
}; |
||||||
|
} |
@ -0,0 +1,118 @@ |
|||||||
|
# DO NOT EDIT! This file is generated automatically. |
||||||
|
# Command: ./maintainers/scripts/fetch-kde-qt.sh pkgs/applications/maui |
||||||
|
{ fetchurl, mirror }: |
||||||
|
|
||||||
|
{ |
||||||
|
buho = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/buho/2.1.2/buho-2.1.2.tar.xz"; |
||||||
|
sha256 = "0xc623w1zp0yh929b8h6mf9r4frnfabd30634ba43x4ac12jk7g8"; |
||||||
|
name = "buho-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
clip = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/clip/2.1.2/clip-2.1.2.tar.xz"; |
||||||
|
sha256 = "168lz2qi4y56pwfwyzqnhwz4lgh2763w260l860527aw049crv4z"; |
||||||
|
name = "clip-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
communicator = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/communicator/2.1.2/communicator-2.1.2.tar.xz"; |
||||||
|
sha256 = "0m7axdjpl7s9cz6fcaj4kwr9wdxybwdb76k9rz5yigyy35vigcfi"; |
||||||
|
name = "communicator-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
index-fm = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/index/2.1.2/index-fm-2.1.2.tar.xz"; |
||||||
|
sha256 = "1yawnzx51h6yrlnivbwz9d7481k382pzg3jnczrajfjnv7ir29dn"; |
||||||
|
name = "index-fm-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
mauikit = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/mauikit/2.1.2/mauikit-2.1.2.tar.xz"; |
||||||
|
sha256 = "1n5p8107lwa4m5gbwlcqmmdlyw15vjaq0dfaz5zal733s6rq2gm7"; |
||||||
|
name = "mauikit-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
mauikit-accounts = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/mauikit-accounts/2.1.2/mauikit-accounts-2.1.2.tar.xz"; |
||||||
|
sha256 = "00nc54gi34r8z6cwa0h8490gd0w01a245rh2g4d9fvbkrybwg7sk"; |
||||||
|
name = "mauikit-accounts-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
mauikit-filebrowsing = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/mauikit-filebrowsing/2.1.2/mauikit-filebrowsing-2.1.2.tar.xz"; |
||||||
|
sha256 = "09pfjr449mkf27ywmwsvflzq0dgaiprw8b2lcms3m5ad7i6jvvyq"; |
||||||
|
name = "mauikit-filebrowsing-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
mauikit-imagetools = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/mauikit-imagetools/2.1.2/mauikit-imagetools-2.1.2.tar.xz"; |
||||||
|
sha256 = "1830x8xwyjs7bj0qi63pl1dk5h2qi6f84mki1schviddddq5cv6j"; |
||||||
|
name = "mauikit-imagetools-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
mauikit-texteditor = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/mauikit-texteditor/2.1.2/mauikit-texteditor-2.1.2.tar.xz"; |
||||||
|
sha256 = "19z9qry56h2624kdx5xnfjzd3spv5shc87p2m6ix33x9mmrf92p1"; |
||||||
|
name = "mauikit-texteditor-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
nota = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/nota/2.1.2/nota-2.1.2.tar.xz"; |
||||||
|
sha256 = "11z1mw6yhwin3wj19gj9495az4p40yjkwrn0nb6i8h9b0nh44pn7"; |
||||||
|
name = "nota-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
pix = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/pix/2.1.2/pix-2.1.2.tar.xz"; |
||||||
|
sha256 = "0ycpazi267pl4l178i34lwzc0ssjklp0indz79r7mcfpr1vicz1s"; |
||||||
|
name = "pix-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
shelf = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/shelf/2.1.2/shelf-2.1.2.tar.xz"; |
||||||
|
sha256 = "0f3781l8wfbpj0irmri0zkp3ia3qlik4aaq3w6qk97xjv24d98xh"; |
||||||
|
name = "shelf-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
station = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/station/2.1.2/station-2.1.2.tar.xz"; |
||||||
|
sha256 = "0lrw7rf8i277nl9bwyx5sc05bswgll00k1jzad1i69rwdfiy9ghg"; |
||||||
|
name = "station-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
vvave = { |
||||||
|
version = "2.1.2"; |
||||||
|
src = fetchurl { |
||||||
|
url = "${mirror}/stable/maui/vvave/2.1.2/vvave-2.1.2.tar.xz"; |
||||||
|
sha256 = "14b6b034899vyvvhzl2jqifqq715lb26dnw3d5wxzxhdplfd7pdf"; |
||||||
|
name = "vvave-2.1.2.tar.xz"; |
||||||
|
}; |
||||||
|
}; |
||||||
|
} |
@ -0,0 +1,43 @@ |
|||||||
|
Description: Fixing argument mismatches in Fortran code, addressing #957430.
|
||||||
|
Author: Andrius Merkys <merkys@debian.org>
|
||||||
|
Forwarded: ccp4-dev@dl.ac.uk
|
||||||
|
--- a/fortran/pack_f.f
|
||||||
|
+++ b/fortran/pack_f.f
|
||||||
|
@@ -106,7 +106,7 @@
|
||||||
|
endif
|
||||||
|
10 continue
|
||||||
|
filnarray(len(filn) + 1) = 0
|
||||||
|
- call pack_wordimage_f(data, x, y, filnarray)
|
||||||
|
+ call pack_longimage_f(data, x, y, filnarray)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
@@ -138,7 +138,7 @@
|
||||||
|
endif
|
||||||
|
10 continue
|
||||||
|
filnarray(len(filn) + 1) = 0
|
||||||
|
- call v2pack_wordimage_f(data, x, y, filnarray)
|
||||||
|
+ call v2pack_longimage_f(data, x, y, filnarray)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
--- a/fortran/lgglib.f
|
||||||
|
+++ b/fortran/lgglib.f
|
||||||
|
@@ -1236,7 +1236,7 @@
|
||||||
|
B3(2) = XYZ(2) * CELL(2)
|
||||||
|
B3(3) = XYZ(3) * CELL(3)
|
||||||
|
C
|
||||||
|
- CALL matmult(3,3,3,1,ORTH,B3,XYZ,B1)
|
||||||
|
+ CALL matmult(3,3,3,1,ORTH,B3,XYZ)
|
||||||
|
END
|
||||||
|
c
|
||||||
|
c
|
||||||
|
@@ -1274,7 +1274,7 @@
|
||||||
|
B3(1) = XYZ(1)
|
||||||
|
B3(2) = XYZ(2)
|
||||||
|
B3(3) = XYZ(3)
|
||||||
|
- CALL matmult(3,3,3,1,ORTH,B3,XYZ,B1)
|
||||||
|
+ CALL matmult(3,3,3,1,ORTH,B3,XYZ)
|
||||||
|
END
|
||||||
|
character*80 function getnam(filnam)
|
||||||
|
character*(*) filnam
|
@ -0,0 +1,226 @@ |
|||||||
|
{ lib |
||||||
|
, stdenv |
||||||
|
, fetchurl |
||||||
|
, fetchFromGitHub |
||||||
|
, cmake |
||||||
|
, lz4 |
||||||
|
, bzip2 |
||||||
|
, gfortran |
||||||
|
, m4 |
||||||
|
, hdf5 |
||||||
|
, gsl |
||||||
|
, slurm |
||||||
|
, unzip |
||||||
|
, makeWrapper |
||||||
|
, meson |
||||||
|
, git |
||||||
|
, ninja |
||||||
|
, eigen |
||||||
|
, pkg-config |
||||||
|
, wrapGAppsHook |
||||||
|
, flex |
||||||
|
, bison |
||||||
|
, doxygen |
||||||
|
, opencl-headers |
||||||
|
, ncurses |
||||||
|
, msgpack |
||||||
|
, fftw |
||||||
|
, zeromq |
||||||
|
, ocl-icd |
||||||
|
, gtk3 |
||||||
|
, gdk-pixbuf |
||||||
|
, argp-standalone |
||||||
|
, memorymappingHook |
||||||
|
, withGui ? true |
||||||
|
, withBitshuffle ? true |
||||||
|
}: |
||||||
|
|
||||||
|
let |
||||||
|
libccp4 = stdenv.mkDerivation rec { |
||||||
|
pname = "libccp4"; |
||||||
|
version = "6.5.1"; |
||||||
|
src = fetchurl { |
||||||
|
# Original mirror, now times out |
||||||
|
# url = "ftp://ftp.ccp4.ac.uk/opensource/${pname}-${version}.tar.gz"; |
||||||
|
url = "https://deb.debian.org/debian/pool/main/libc/${pname}/${pname}_${version}.orig.tar.gz"; |
||||||
|
sha256 = "1rfvjliny29vy5bdi6rrjaw9hhhhh72pw536xwvqipqcjlylf2r8"; |
||||||
|
}; |
||||||
|
nativeBuildInputs = [ gfortran m4 ]; |
||||||
|
buildInputs = [ hdf5 gsl ]; |
||||||
|
|
||||||
|
configureFlags = [ "FFLAGS=-fallow-argument-mismatch" ]; |
||||||
|
|
||||||
|
# libccp4 tries to read syminfo.lib by looking at an environment variable, which hinders reproducibility. |
||||||
|
# We hard-code this by providing a little patch and then passing the absolute path to syminfo.lib as a |
||||||
|
# preprocessor flag. |
||||||
|
preBuild = '' |
||||||
|
makeFlagsArray+=(CFLAGS='-DNIX_PROVIDED_SYMOP_FILE=\"$out/share/syminfo.lib\"') |
||||||
|
export NIX_LDFLAGS="-L${gfortran.cc}/lib64 -L${gfortran.cc}/lib $NIX_LDFLAGS"; |
||||||
|
''; |
||||||
|
makeFlags = [ "CFLAGS='-DNIX_PROVIDED_SYMOP_FILE=\"${placeholder "out"}/share/syminfo.lib\"" ]; |
||||||
|
|
||||||
|
patches = [ |
||||||
|
./libccp4-use-hardcoded-syminfo-lib.patch |
||||||
|
./0002-fix-ftbfs-with-gcc-10.patch |
||||||
|
]; |
||||||
|
}; |
||||||
|
# This is the statically-linked, pre-built binary of mosflm. Compiling it ourselves turns out to be very difficult |
||||||
|
# since the build process is very hard-coded for a specific machine, architecture, and libraries. |
||||||
|
mosflm = |
||||||
|
let |
||||||
|
version = "7.4.0"; |
||||||
|
src = |
||||||
|
if stdenv.isDarwin then |
||||||
|
fetchurl |
||||||
|
{ |
||||||
|
url = "https://www.mrc-lmb.cam.ac.uk/mosflm/mosflm/ver${builtins.replaceStrings [ "." ] [ "" ] version}/pre-built/mosflm-osx-64-noX11.zip"; |
||||||
|
sha256 = "1da5wimv3kl8bccp49j69vh8gi28cn7axg59lrmb38s68c618h7j"; |
||||||
|
} |
||||||
|
else |
||||||
|
fetchurl { |
||||||
|
url = "https://www.mrc-lmb.cam.ac.uk/mosflm/mosflm/ver${builtins.replaceStrings [ "." ] [ "" ] version}/pre-built/mosflm-linux-64-noX11.zip"; |
||||||
|
sha256 = "1rqh3nprxfmnyihllw31nb8i3wfhybmsic6y7z6wn4rafyv3w4fk"; |
||||||
|
}; |
||||||
|
mosflmBinary = if stdenv.isDarwin then "bin/mosflm" else "mosflm-linux-64-noX11"; |
||||||
|
in |
||||||
|
stdenv.mkDerivation rec { |
||||||
|
pname = "mosflm"; |
||||||
|
|
||||||
|
inherit version src; |
||||||
|
|
||||||
|
dontBuild = true; |
||||||
|
|
||||||
|
nativeBuildInputs = [ unzip makeWrapper ]; |
||||||
|
|
||||||
|
sourceRoot = "."; |
||||||
|
|
||||||
|
# mosflm statically links against its own libccp4, which as the syminfo.lib environment variable problem. |
||||||
|
# Here, we circumvent it by creating a little wrapper script that calls mosflm after setting the SYMINFO variable. |
||||||
|
installPhase = '' |
||||||
|
mkdir -p $out/bin |
||||||
|
cp ${mosflmBinary} $out/bin/mosflm-raw |
||||||
|
makeWrapper $out/bin/mosflm-raw $out/bin/mosflm --set SYMINFO ${libccp4}/share/syminfo.lib --add-flags -n |
||||||
|
''; |
||||||
|
}; |
||||||
|
|
||||||
|
xgandalf = stdenv.mkDerivation rec { |
||||||
|
pname = "xgandalf"; |
||||||
|
version = "c15afa2381d5f87d4aefcc8181a15b4a6fd3a955"; |
||||||
|
src = fetchurl { |
||||||
|
url = "https://gitlab.desy.de/thomas.white/${pname}/-/archive/${version}/${pname}-${version}.tar.gz"; |
||||||
|
sha256 = "11i1w57a3rpnb4x5y4n8d3iffn5m9w1zydl69syzljdk3aqg2pv8"; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ meson pkg-config ninja ]; |
||||||
|
buildInputs = [ eigen ]; |
||||||
|
}; |
||||||
|
|
||||||
|
pinkIndexer = stdenv.mkDerivation rec { |
||||||
|
pname = "pinkindexer"; |
||||||
|
version = "8a828788f8272a89d484b00afbd2500c2c1ff974"; |
||||||
|
src = fetchurl { |
||||||
|
url = "https://gitlab.desy.de/thomas.white/${pname}/-/archive/${version}/${pname}-${version}.tar.gz"; |
||||||
|
sha256 = "1mkgf1xd91ay0z0632kzxm0z3wcxf0cayjvs6a3znds72dkhfsyh"; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ meson pkg-config ninja ]; |
||||||
|
buildInputs = [ eigen ]; |
||||||
|
}; |
||||||
|
|
||||||
|
fdip = stdenv.mkDerivation rec { |
||||||
|
pname = "fdip"; |
||||||
|
version = "29da626f17f66d5c0780fc59b1eafb7c85b81dd6"; |
||||||
|
src = fetchurl { |
||||||
|
url = "https://gitlab.desy.de/philipp.middendorf/fdip/-/archive/${version}/fdip-${version}.tar.gz"; |
||||||
|
sha256 = "184l76r4fgznq54rnhgjk7dg41kqdl0d1da02vr5y4cs2fyqppky"; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ meson ninja pkg-config ]; |
||||||
|
buildInputs = [ eigen ]; |
||||||
|
}; |
||||||
|
|
||||||
|
hdf5-external-filter-plugins = stdenv.mkDerivation rec { |
||||||
|
pname = "HDF5-External-Filter-Plugins"; |
||||||
|
version = "0.1.0"; |
||||||
|
src = fetchFromGitHub { |
||||||
|
owner = "nexusformat"; |
||||||
|
repo = pname; |
||||||
|
rev = "d469f175e5273c1d488e71a6134f84088f57d39c"; |
||||||
|
sha256 = "1jrzzh75i68ad1yrim7s1nx9wy0s49ghkziahs71mm5azprm6gh9"; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ cmake ]; |
||||||
|
buildInputs = [ hdf5 lz4 bzip2 ]; |
||||||
|
|
||||||
|
cmakeFlags = [ |
||||||
|
"-DENABLE_BITSHUFFLE_PLUGIN=yes" |
||||||
|
"-DENABLE_LZ4_PLUGIN=yes" |
||||||
|
"-DENABLE_BZIP2_PLUGIN=yes" |
||||||
|
]; |
||||||
|
}; |
||||||
|
in |
||||||
|
stdenv.mkDerivation rec { |
||||||
|
pname = "crystfel"; |
||||||
|
version = "0.10.1"; |
||||||
|
src = fetchurl { |
||||||
|
url = "https://www.desy.de/~twhite/${pname}/${pname}-${version}.tar.gz"; |
||||||
|
sha256 = "0i9d5ggalic7alj97dxjdys7010kxhm2cb4lwakvigl023j8ms79"; |
||||||
|
}; |
||||||
|
nativeBuildInputs = [ meson pkg-config ninja flex bison doxygen opencl-headers ] |
||||||
|
++ lib.optionals withGui [ wrapGAppsHook ]; |
||||||
|
buildInputs = [ |
||||||
|
hdf5 |
||||||
|
gsl |
||||||
|
ncurses |
||||||
|
msgpack |
||||||
|
fftw |
||||||
|
fdip |
||||||
|
zeromq |
||||||
|
ocl-icd |
||||||
|
libccp4 |
||||||
|
mosflm |
||||||
|
pinkIndexer |
||||||
|
xgandalf |
||||||
|
] ++ lib.optionals withGui [ gtk3 gdk-pixbuf ] |
||||||
|
++ lib.optionals stdenv.isDarwin [ |
||||||
|
argp-standalone |
||||||
|
memorymappingHook |
||||||
|
] |
||||||
|
# slurm is not available for Darwin; when it is, remove the condition |
||||||
|
++ lib.optionals (!stdenv.isDarwin) [ slurm ] |
||||||
|
# hdf5-external-filter-plugins doesn't link on Darwin |
||||||
|
++ lib.optionals (withBitshuffle && !stdenv.isDarwin) [ hdf5-external-filter-plugins ]; |
||||||
|
|
||||||
|
patches = [ ./link-to-argp-standalone-if-needed.patch ]; |
||||||
|
|
||||||
|
# CrystFEL calls mosflm by searching PATH for it. We could've create a wrapper script that sets the PATH, but |
||||||
|
# we'd have to do that for every CrystFEL executable (indexamajig, crystfel, partialator). Better to just |
||||||
|
# hard-code mosflm's path once. |
||||||
|
postPatch = '' |
||||||
|
sed -i -e 's#execlp("mosflm"#execl("${mosflm}/bin/mosflm"#' libcrystfel/src/indexers/mosflm.c; |
||||||
|
''; |
||||||
|
|
||||||
|
postInstall = lib.optionalString (withBitshuffle && !stdenv.isDarwin) '' |
||||||
|
for file in $out/bin/*; do |
||||||
|
wrapProgram $file --set HDF5_PLUGIN_PATH ${hdf5-external-filter-plugins}/lib/plugins |
||||||
|
done |
||||||
|
''; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "Data processing for serial crystallography"; |
||||||
|
longDescription = '' |
||||||
|
CrystFEL is a suite of programs for processing (and simulating) Bragg diffraction data from "serial crystallography" experiments, often (but not always) performed using an X-ray Free-Electron Laser. Compared to rotation data, some of the particular characteristics of such data which call for a specialised software suite are: |
||||||
|
|
||||||
|
- The sliced, rather than integrated, measurement of intensity data. Many, if not all reflections are partially integrated. |
||||||
|
- Many patterns (thousands) are required - high throughput is needed. |
||||||
|
- The crystal orientations in each pattern are random and uncorrelated. |
||||||
|
- Merging into lower symmetry point groups may require the resolution of indexing ambiguities.''; |
||||||
|
homepage = "https://www.desy.de/~twhite/crystfel/"; |
||||||
|
changelog = "https://www.desy.de/~twhite/crystfel/changes.html"; |
||||||
|
downloadPage = "https://www.desy.de/~twhite/crystfel/download.html"; |
||||||
|
license = licenses.gpl3Plus; |
||||||
|
maintainers = with maintainers; [ pmiddend ]; |
||||||
|
platforms = [ "x86_64-linux" "x86_64-darwin" ]; |
||||||
|
}; |
||||||
|
|
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
diff --git a/ccp4/csymlib.c b/ccp4/csymlib.c
|
||||||
|
index 76bc70b..7a0c5dc 100644
|
||||||
|
--- a/ccp4/csymlib.c
|
||||||
|
+++ b/ccp4/csymlib.c
|
||||||
|
@@ -137,24 +137,7 @@ CCP4SPG *ccp4spg_load_spacegroup(const int numspg, const int ccp4numspg,
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Open the symop file: */
|
||||||
|
- if (!(symopfile = getenv("SYMINFO"))) {
|
||||||
|
- if (debug)
|
||||||
|
- printf("Environment variable SYMINFO not set ... guessing location of symmetry file. \n");
|
||||||
|
- if (!(ccp4dir = getenv("CLIBD"))) {
|
||||||
|
- printf("Environment variable CLIBD not set ... big trouble! \n");
|
||||||
|
- return NULL;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- symopfile = ccp4_utils_malloc((strlen(ccp4dir)+22)*sizeof(char));
|
||||||
|
- strcpy(symopfile,ccp4_utils_joinfilenames(ccp4dir,"syminfo.lib"));
|
||||||
|
- symopfile[strlen(ccp4dir)+21] = '\0';
|
||||||
|
- ccp4printf(1," SYMINFO file set to %s \n",symopfile);
|
||||||
|
- } else {
|
||||||
|
- if (debug) {
|
||||||
|
- ccp4printf(1,"\n Spacegroup information obtained from library file: \n");
|
||||||
|
- ccp4printf(1," Logical Name: SYMINFO Filename: %s\n\n",symopfile);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
+ symopfile = NIX_PROVIDED_SYMOP_FILE;
|
||||||
|
|
||||||
|
filein = fopen(symopfile,"r");
|
||||||
|
if (!filein) {
|
@ -0,0 +1,26 @@ |
|||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index efc9002b..070f37e4 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -34,6 +34,12 @@ if slurmdep.found()
|
||||||
|
conf_data.set10('HAVE_SLURM', 1)
|
||||||
|
endif
|
||||||
|
|
||||||
|
+if build_machine.system() == 'darwin' or build_machine.system() == 'freebsd' or not cc.links('#include <argp.h>\nstatic error_t parse_opt (int key, char *arg, struct argp_state *state) { argp_usage(state); return 0; }; void main() {}')
|
||||||
|
+ argpdep = cc.find_library('argp')
|
||||||
|
+else
|
||||||
|
+ argpdep = dependency('', required : false)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
# Find HDF5 using inbuilt Meson methods. Requires Meson >= 0.50.0
|
||||||
|
hdf5dep = dependency('hdf5', language: 'c', required: true)
|
||||||
|
|
||||||
|
@@ -180,7 +186,7 @@ if zmqdep.found()
|
||||||
|
endif
|
||||||
|
|
||||||
|
executable('indexamajig', indexamajig_sources,
|
||||||
|
- dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep],
|
||||||
|
+ dependencies: [mdep, libcrystfeldep, gsldep, pthreaddep, zmqdep, argpdep],
|
||||||
|
install: true,
|
||||||
|
install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')
|
||||||
|
|
@ -0,0 +1,57 @@ |
|||||||
|
From fcae473c4b6ac2120ec75c321d6db850d8ecd6a9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Mustafa=20=C3=87al=C4=B1=C5=9Fkan?= <muscaln@protonmail.com>
|
||||||
|
Date: Sat, 30 Apr 2022 16:37:44 +0300
|
||||||
|
Subject: [PATCH 1/3] Makefile
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index dc388c21..7efc9901 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -14,11 +14,6 @@ LLVM_VERSIONS = 14 13 12 11
|
||||||
|
errifempty = $(if $(1),$(1),$(error $(2)))
|
||||||
|
detect = $(shell which $(call errifempty,$(firstword $(foreach p,$(2),$(shell command -v $(p) 2> /dev/null && echo $(p)))),failed to locate $(1) at any of: $(2)))
|
||||||
|
toolSearchPathsVersion = $(1)-$(2)
|
||||||
|
-ifeq ($(shell uname -s),Darwin)
|
||||||
|
- # Also explicitly search Brew's copy, which is not in PATH by default.
|
||||||
|
- BREW_PREFIX := $(shell brew --prefix)
|
||||||
|
- toolSearchPathsVersion += $(BREW_PREFIX)/opt/llvm@$(2)/bin/$(1)-$(2) $(BREW_PREFIX)/opt/llvm@$(2)/bin/$(1)
|
||||||
|
-endif
|
||||||
|
# First search for a custom built copy, then move on to explicitly version-tagged binaries, then just see if the tool is in path with its normal name.
|
||||||
|
findLLVMTool = $(call detect,$(1),$(abspath llvm-build/bin/$(1)) $(foreach ver,$(LLVM_VERSIONS),$(call toolSearchPathsVersion,$(1),$(ver))) $(1))
|
||||||
|
CLANG ?= $(call findLLVMTool,clang)
|
||||||
|
@@ -644,9 +639,8 @@ endif
|
||||||
|
wasmtest:
|
||||||
|
$(GO) test ./tests/wasm
|
||||||
|
|
||||||
|
-build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN)),,binaryen)
|
||||||
|
+build/release:
|
||||||
|
@mkdir -p build/release/tinygo/bin
|
||||||
|
- @mkdir -p build/release/tinygo/lib/clang/include
|
||||||
|
@mkdir -p build/release/tinygo/lib/CMSIS/CMSIS
|
||||||
|
@mkdir -p build/release/tinygo/lib/macos-minimal-sdk
|
||||||
|
@mkdir -p build/release/tinygo/lib/mingw-w64/mingw-w64-crt/lib-common
|
||||||
|
@@ -663,10 +657,6 @@ build/release: tinygo gen-device wasi-libc $(if $(filter 1,$(USE_SYSTEM_BINARYEN
|
||||||
|
@mkdir -p build/release/tinygo/pkg/thumbv7em-unknown-unknown-eabi-cortex-m4
|
||||||
|
@echo copying source files
|
||||||
|
@cp -p build/tinygo$(EXE) build/release/tinygo/bin
|
||||||
|
-ifneq ($(USE_SYSTEM_BINARYEN),1)
|
||||||
|
- @cp -p build/wasm-opt$(EXE) build/release/tinygo/bin
|
||||||
|
-endif
|
||||||
|
- @cp -p $(abspath $(CLANG_SRC))/lib/Headers/*.h build/release/tinygo/lib/clang/include
|
||||||
|
@cp -rp lib/CMSIS/CMSIS/Include build/release/tinygo/lib/CMSIS/CMSIS
|
||||||
|
@cp -rp lib/CMSIS/README.md build/release/tinygo/lib/CMSIS
|
||||||
|
@cp -rp lib/macos-minimal-sdk/* build/release/tinygo/lib/macos-minimal-sdk
|
||||||
|
@@ -705,8 +695,7 @@ endif
|
||||||
|
@cp -rp lib/picolibc/newlib/libm/common build/release/tinygo/lib/picolibc/newlib/libm
|
||||||
|
@cp -rp lib/picolibc-stdio.c build/release/tinygo/lib
|
||||||
|
@cp -rp lib/wasi-libc/sysroot build/release/tinygo/lib/wasi-libc/sysroot
|
||||||
|
- @cp -rp llvm-project/compiler-rt/lib/builtins build/release/tinygo/lib/compiler-rt-builtins
|
||||||
|
- @cp -rp llvm-project/compiler-rt/LICENSE.TXT build/release/tinygo/lib/compiler-rt-builtins
|
||||||
|
+ @cp -rp lib/compiler-rt-builtins build/release/tinygo/lib/compiler-rt-builtins
|
||||||
|
@cp -rp src build/release/tinygo/src
|
||||||
|
@cp -rp targets build/release/tinygo/targets
|
||||||
|
./build/tinygo build-library -target=cortex-m0 -o build/release/tinygo/pkg/thumbv6m-unknown-unknown-eabi-cortex-m0/compiler-rt compiler-rt
|
||||||
|
--
|
||||||
|
2.36.0
|
||||||
|
|
@ -0,0 +1,55 @@ |
|||||||
|
From 4ee942ccc7cdb06ee51490e9cb44ecb36b25378a Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Mustafa=20=C3=87al=C4=B1=C5=9Fkan?= <muscaln@protonmail.com>
|
||||||
|
Date: Sat, 30 Apr 2022 16:18:31 +0300
|
||||||
|
Subject: [PATCH 2/3] Add clang header path
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/builder/builtins.go b/builder/builtins.go
|
||||||
|
index 479b541d..b35283c6 100644
|
||||||
|
--- a/builder/builtins.go
|
||||||
|
+++ b/builder/builtins.go
|
||||||
|
@@ -164,7 +164,7 @@ var aeabiBuiltins = []string{
|
||||||
|
var CompilerRT = Library{
|
||||||
|
name: "compiler-rt",
|
||||||
|
cflags: func(target, headerPath string) []string {
|
||||||
|
- return []string{"-Werror", "-Wall", "-std=c11", "-nostdlibinc"}
|
||||||
|
+ return []string{"-Werror", "-Wall", "-std=c11", "-isystem", "@clang_include@"}
|
||||||
|
},
|
||||||
|
sourceDir: func() string {
|
||||||
|
llvmDir := filepath.Join(goenv.Get("TINYGOROOT"), "llvm-project/compiler-rt/lib/builtins")
|
||||||
|
diff --git a/builder/picolibc.go b/builder/picolibc.go
|
||||||
|
index f1b061ae..159f90cf 100644
|
||||||
|
--- a/builder/picolibc.go
|
||||||
|
+++ b/builder/picolibc.go
|
||||||
|
@@ -27,7 +27,7 @@ var Picolibc = Library{
|
||||||
|
"-D_COMPILING_NEWLIB",
|
||||||
|
"-DHAVE_ALIAS_ATTRIBUTE",
|
||||||
|
"-DTINY_STDIO",
|
||||||
|
- "-nostdlibinc",
|
||||||
|
+ "-isystem", "@clang_include@",
|
||||||
|
"-isystem", picolibcDir + "/include",
|
||||||
|
"-I" + picolibcDir + "/tinystdio",
|
||||||
|
"-I" + headerPath,
|
||||||
|
diff --git a/compileopts/config.go b/compileopts/config.go
|
||||||
|
index b30e653e..7561b3f2 100644
|
||||||
|
--- a/compileopts/config.go
|
||||||
|
+++ b/compileopts/config.go
|
||||||
|
@@ -288,6 +288,7 @@ func (c *Config) CFlags() []string {
|
||||||
|
path, _ := c.LibcPath("picolibc")
|
||||||
|
cflags = append(cflags,
|
||||||
|
"--sysroot="+path,
|
||||||
|
+ "-isystem", "@clang_include@",
|
||||||
|
"-isystem", filepath.Join(path, "include"), // necessary for Xtensa
|
||||||
|
"-isystem", filepath.Join(picolibcDir, "include"),
|
||||||
|
"-isystem", filepath.Join(picolibcDir, "tinystdio"),
|
||||||
|
@@ -297,7 +298,6 @@ func (c *Config) CFlags() []string {
|
||||||
|
path, _ := c.LibcPath("musl")
|
||||||
|
arch := MuslArchitecture(c.Triple())
|
||||||
|
cflags = append(cflags,
|
||||||
|
- "-nostdlibinc",
|
||||||
|
"-isystem", filepath.Join(path, "include"),
|
||||||
|
"-isystem", filepath.Join(root, "lib", "musl", "arch", arch),
|
||||||
|
"-isystem", filepath.Join(root, "lib", "musl", "include"),
|
||||||
|
--
|
||||||
|
2.36.0
|
||||||
|
|
@ -1,64 +1,147 @@ |
|||||||
{ lib, buildGoModule, fetchFromGitHub, llvm, clang-unwrapped, lld, avrgcc |
{ stdenv |
||||||
, avrdude, openocd, gcc-arm-embedded, makeWrapper, fetchurl }: |
, lib |
||||||
|
, buildPackages |
||||||
|
, buildGoModule |
||||||
|
, fetchFromGitHub |
||||||
|
, makeWrapper |
||||||
|
, substituteAll |
||||||
|
, llvmPackages |
||||||
|
, go |
||||||
|
, libffi |
||||||
|
, zlib |
||||||
|
, ncurses |
||||||
|
, libxml2 |
||||||
|
, xar |
||||||
|
, wasi-libc |
||||||
|
, avrgcc |
||||||
|
, binaryen |
||||||
|
, avrdude |
||||||
|
, gdb |
||||||
|
, openocd |
||||||
|
}: |
||||||
|
|
||||||
let main = ./main.go; |
let |
||||||
gomod = ./go.mod; |
llvmMajor = lib.versions.major llvm.version; |
||||||
|
inherit (llvmPackages) llvm clang compiler-rt lld; |
||||||
in |
in |
||||||
|
|
||||||
buildGoModule rec { |
buildGoModule rec { |
||||||
pname = "tinygo"; |
pname = "tinygo"; |
||||||
version = "0.16.0"; |
version = "0.23.0"; |
||||||
|
|
||||||
src = fetchFromGitHub { |
src = fetchFromGitHub { |
||||||
owner = "tinygo-org"; |
owner = "tinygo-org"; |
||||||
repo = "tinygo"; |
repo = "tinygo"; |
||||||
rev = "v${version}"; |
rev = "v${version}"; |
||||||
sha256 = "063aszbsnr0myq56kms1slmrfs7m4nmg0zgh2p66lxdsifrfly7j"; |
sha256 = "sha256-YgQGAQJw9Xyw5BF2d9uZTQHfjHsu2evZGo4RV9DtStE="; |
||||||
fetchSubmodules = true; |
fetchSubmodules = true; |
||||||
}; |
}; |
||||||
|
|
||||||
overrideModAttrs = (_: { |
vendorSha256 = "sha256-fK8BlCh+1NtHW6MwW68iSIB+Sw6AK+g3y4lMyMYrXkk="; |
||||||
patches = []; |
|
||||||
preBuild = '' |
patches = [ |
||||||
rm -rf * |
./0001-Makefile.patch |
||||||
cp ${main} main.go |
|
||||||
cp ${gomod} go.mod |
(substituteAll { |
||||||
chmod +w go.mod |
src = ./0002-Add-clang-header-path.patch; |
||||||
''; |
clang_include = "${clang.cc.lib}/lib/clang/${clang.cc.version}/include"; |
||||||
}); |
}) |
||||||
|
]; |
||||||
|
|
||||||
preBuild = "cp ${gomod} go.mod"; |
checkInputs = [ avrgcc binaryen ]; |
||||||
|
nativeBuildInputs = [ go makeWrapper ]; |
||||||
|
buildInputs = [ llvm clang.cc ] |
||||||
|
++ lib.optionals stdenv.isDarwin [ zlib ncurses libffi libxml2 xar ]; |
||||||
|
|
||||||
postBuild = "make gen-device"; |
doCheck = stdenv.buildPlatform == stdenv.hostPlatform; |
||||||
|
|
||||||
vendorSha256 = "12k2gin0v7aqz5543m12yhifc0xsz26qyqra5l4c68xizvzcvkxb"; |
allowGoReference = true; |
||||||
|
tags = [ "llvm${llvmMajor}" ]; |
||||||
|
subPackages = [ "." ]; |
||||||
|
|
||||||
doCheck = false; |
# Output contains static libraries for different arm cpus |
||||||
|
# and stripping could mess up these so only strip the compiler |
||||||
|
stripDebugList = [ "bin" ]; |
||||||
|
|
||||||
prePatch = '' |
postConfigure = lib.optionalString stdenv.isDarwin '' |
||||||
sed -i s/', "-nostdlibinc"'// builder/builtins.go |
for i in vendor/tinygo.org/x/go-llvm/llvm_config_darwin*; do |
||||||
sed -i s/'"-nostdlibinc", '// compileopts/config.go builder/picolibc.go |
substituteInPlace $i --replace "curses" "ncurses" |
||||||
|
done |
||||||
''; |
''; |
||||||
|
|
||||||
subPackages = [ "." ]; |
postPatch = '' |
||||||
nativeBuildInputs = [ makeWrapper ]; |
# Copy wasi-libc, symlink seems not working |
||||||
buildInputs = [ llvm clang-unwrapped ]; |
rm -rf lib/wasi-libc/* |
||||||
propagatedBuildInputs = [ lld avrgcc avrdude openocd gcc-arm-embedded ]; |
mkdir -p lib/wasi-libc/sysroot/lib/wasm32-wasi lib/wasi-libc/sysroot/include |
||||||
|
cp -a ${wasi-libc}/lib/* lib/wasi-libc/sysroot/lib/wasm32-wasi/ |
||||||
postInstall = '' |
cp -a ${wasi-libc.dev}/include/* lib/wasi-libc/sysroot/include/ |
||||||
mkdir -p $out/share/tinygo |
|
||||||
cp -a lib src targets $out/share/tinygo |
# Borrow compiler-rt builtins from our source |
||||||
wrapProgram $out/bin/tinygo --prefix "TINYGOROOT" : "$out/share/tinygo" \ |
# See https://github.com/tinygo-org/tinygo/pull/2471 |
||||||
--prefix "PATH" : "$out/libexec/tinygo" |
mkdir -p lib/compiler-rt-builtins |
||||||
|
cp -a ${compiler-rt.src}/compiler-rt/lib/builtins/* lib/compiler-rt-builtins/ |
||||||
|
|
||||||
|
substituteInPlace Makefile \ |
||||||
|
--replace "\$(TINYGO)" "$(pwd)/build/tinygo" \ |
||||||
|
--replace "build/release/tinygo/bin" "$out/bin" \ |
||||||
|
--replace "build/release/" "$out/share/" |
||||||
|
|
||||||
|
# TODO: Fix mingw and darwin |
||||||
|
# Disable windows and darwin cross-compile tests |
||||||
|
sed -i "/GOOS=windows/d" Makefile |
||||||
|
sed -i "/GOOS=darwin/d" Makefile |
||||||
|
|
||||||
|
# tinygo needs versioned binaries |
||||||
mkdir -p $out/libexec/tinygo |
mkdir -p $out/libexec/tinygo |
||||||
ln -s ${clang-unwrapped}/bin/clang $out/libexec/tinygo/clang-10 |
ln -s ${lib.getBin clang.cc}/bin/clang $out/libexec/tinygo/clang-${llvmMajor} |
||||||
ln -s ${lld}/bin/lld $out/libexec/tinygo/ld.lld-10 |
ln -s ${lib.getBin lld}/bin/ld.lld $out/libexec/tinygo/ld.lld-${llvmMajor} |
||||||
ln -sf $out/bin $out/share/tinygo |
ln -s ${lib.getBin lld}/bin/wasm-ld $out/libexec/tinygo/wasm-ld-${llvmMajor} |
||||||
|
ln -s ${gdb}/bin/gdb $out/libexec/tinygo/gdb-multiarch |
||||||
|
'' + lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' |
||||||
|
substituteInPlace Makefile \ |
||||||
|
--replace "./build/tinygo" "${buildPackages.tinygo}/bin/tinygo" |
||||||
|
''; |
||||||
|
|
||||||
|
preBuild = '' |
||||||
|
export HOME=$TMPDIR |
||||||
|
export GOCACHE=$TMPDIR/go-cache |
||||||
|
export GOPATH=$TMPDIR/go |
||||||
|
export PATH=$out/libexec/tinygo:$PATH |
||||||
''; |
''; |
||||||
|
|
||||||
|
postBuild = '' |
||||||
|
# Move binary |
||||||
|
mkdir -p build |
||||||
|
mv $GOPATH/bin/tinygo build/tinygo |
||||||
|
|
||||||
|
make gen-device |
||||||
|
''; |
||||||
|
|
||||||
|
checkPhase = '' |
||||||
|
runHook preCheck |
||||||
|
make smoketest XTENSA=0 |
||||||
|
runHook postCheck |
||||||
|
''; |
||||||
|
|
||||||
|
installPhase = '' |
||||||
|
runHook preInstall |
||||||
|
|
||||||
|
make build/release |
||||||
|
|
||||||
|
wrapProgram $out/bin/tinygo \ |
||||||
|
--set TINYGOROOT $out/share/tinygo \ |
||||||
|
--prefix PATH : ${lib.makeBinPath [ go avrdude openocd avrgcc binaryen ]}:$out/libexec/tinygo |
||||||
|
|
||||||
|
runHook postInstall |
||||||
|
''; |
||||||
|
|
||||||
|
disallowedReferences = [ wasi-libc ]; |
||||||
|
|
||||||
meta = with lib; { |
meta = with lib; { |
||||||
homepage = "https://tinygo.org/"; |
homepage = "https://tinygo.org/"; |
||||||
description = "Go compiler for small places"; |
description = "Go compiler for small places"; |
||||||
license = licenses.bsd3; |
license = licenses.bsd3; |
||||||
maintainers = with maintainers; [ Madouura ]; |
maintainers = with maintainers; [ Madouura muscaln ]; |
||||||
|
broken = stdenv.isDarwin; |
||||||
}; |
}; |
||||||
} |
} |
||||||
|
@ -1,14 +0,0 @@ |
|||||||
module github.com/tinygo-org/tinygo |
|
||||||
|
|
||||||
go 1.11 |
|
||||||
|
|
||||||
require ( |
|
||||||
github.com/blakesmith/ar v0.0.0-20150311145944-8bd4349a67f2 |
|
||||||
github.com/chromedp/cdproto v0.0.0-20200709115526-d1f6fc58448b |
|
||||||
github.com/chromedp/chromedp v0.5.4-0.20200303084119-2bb39134ab9e |
|
||||||
github.com/google/shlex v0.0.0-20181106134648-c34317bd91bf |
|
||||||
github.com/marcinbor85/gohex v0.0.0-20200531091804-343a4b548892 |
|
||||||
go.bug.st/serial v1.0.0 |
|
||||||
golang.org/x/tools v0.0.0-20200216192241-b320d3a0f5a2 |
|
||||||
tinygo.org/x/go-llvm v0.0.0-20201104183921-570e7a6841d9 |
|
||||||
) |
|
@ -1,18 +0,0 @@ |
|||||||
package main |
|
||||||
|
|
||||||
import ( |
|
||||||
"fmt" |
|
||||||
|
|
||||||
_ "github.com/blakesmith/ar" |
|
||||||
_ "github.com/google/shlex" |
|
||||||
_ "github.com/marcinbor85/gohex" |
|
||||||
_ "go.bug.st/serial" |
|
||||||
_ "golang.org/x/tools/go/ast/astutil" |
|
||||||
_ "golang.org/x/tools/go/ssa" |
|
||||||
_ "google.golang.org/appengine" |
|
||||||
_ "tinygo.org/x/go-llvm" |
|
||||||
) |
|
||||||
|
|
||||||
func main() { |
|
||||||
fmt.Println("vim-go") |
|
||||||
} |
|
@ -0,0 +1,8 @@ |
|||||||
|
{ mkDerivation }: |
||||||
|
|
||||||
|
# How to obtain `sha256`: |
||||||
|
# nix-prefetch-url --unpack https://github.com/erlang/otp/archive/OTP-${version}.tar.gz |
||||||
|
mkDerivation { |
||||||
|
version = "25.0-rc3"; |
||||||
|
sha256 = "1ir42hz81bzxn1shqq0gn824hxd6j774889vjy68psi95psfs8r2"; |
||||||
|
} |
@ -0,0 +1,29 @@ |
|||||||
|
{ lib, fetchFromGitHub, buildPythonPackage, beautifulsoup4, httpx, pbkdf2, pillow, pyaes, rsa }: |
||||||
|
|
||||||
|
buildPythonPackage rec { |
||||||
|
pname = "audible"; |
||||||
|
version = "0.8.1"; |
||||||
|
|
||||||
|
src = fetchFromGitHub { |
||||||
|
owner = "mkb79"; |
||||||
|
repo = "Audible"; |
||||||
|
rev = "v${version}"; |
||||||
|
sha256 = "0fsb5av4s7fvpn0iryl8jj3lwffwlxgbwj46l3fidy0l58nq3b1d"; |
||||||
|
}; |
||||||
|
|
||||||
|
propagatedBuildInputs = [ beautifulsoup4 httpx pbkdf2 pillow pyaes rsa ]; |
||||||
|
|
||||||
|
postPatch = '' |
||||||
|
substituteInPlace setup.py \ |
||||||
|
--replace 'httpx>=0.20.*,<=0.22.*' 'httpx' |
||||||
|
''; |
||||||
|
|
||||||
|
pythonImportsCheck = [ "audible"]; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "A(Sync) Interface for internal Audible API written in pure Python"; |
||||||
|
license = licenses.agpl3; |
||||||
|
homepage = "https://github.com/mkb79/Audible"; |
||||||
|
maintainers = with maintainers; [ jvanbruegge ]; |
||||||
|
}; |
||||||
|
} |
@ -0,0 +1,38 @@ |
|||||||
|
{ lib |
||||||
|
, buildPythonPackage |
||||||
|
, fetchFromGitHub |
||||||
|
, djangorestframework |
||||||
|
}: |
||||||
|
|
||||||
|
buildPythonPackage rec { |
||||||
|
pname = "djangorestframework-dataclasses"; |
||||||
|
version = "1.1.1"; |
||||||
|
|
||||||
|
src = fetchFromGitHub { |
||||||
|
owner = "oxan"; |
||||||
|
repo = "djangorestframework-dataclasses"; |
||||||
|
rev = "v${version}"; |
||||||
|
sha256 = "sha256-wXgA/4Dik6yG0nKl9GbrHgb2lhrPsgS23+cEyaD9MRY="; |
||||||
|
}; |
||||||
|
|
||||||
|
postPatch = '' |
||||||
|
patchShebangs manage.py |
||||||
|
''; |
||||||
|
|
||||||
|
propagatedBuildInputs = [ |
||||||
|
djangorestframework |
||||||
|
]; |
||||||
|
|
||||||
|
checkPhase = '' |
||||||
|
./manage.py test |
||||||
|
''; |
||||||
|
|
||||||
|
pythonImportsCheck = [ "rest_framework_dataclasses" ]; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = " Dataclasses serializer for Django REST framework"; |
||||||
|
homepage = "https://github.com/oxan/djangorestframework-dataclasses"; |
||||||
|
license = licenses.bsd3; |
||||||
|
maintainers = with maintainers; [ SuperSandro2000 ]; |
||||||
|
}; |
||||||
|
} |
@ -1,22 +1,41 @@ |
|||||||
{lib, fetchPypi, buildPythonPackage, numpy, pyparsing, pytest-cov, pytestCheckHook }: |
{ lib |
||||||
|
, fetchPypi |
||||||
|
, buildPythonPackage |
||||||
|
, numpy |
||||||
|
, pyparsing |
||||||
|
, pytestCheckHook |
||||||
|
, pythonOlder |
||||||
|
}: |
||||||
|
|
||||||
buildPythonPackage rec { |
buildPythonPackage rec { |
||||||
pname = "periodictable"; |
pname = "periodictable"; |
||||||
version = "1.6.0"; |
version = "1.6.1"; |
||||||
|
format = "setuptools"; |
||||||
|
|
||||||
propagatedBuildInputs = [numpy pyparsing]; |
disabled = pythonOlder "3.7"; |
||||||
|
|
||||||
src = fetchPypi { |
src = fetchPypi { |
||||||
inherit pname version; |
inherit pname version; |
||||||
sha256 = "52e925220005c20e97601e7b04ad6cebc271680947ab9adcbb1a796ddbaa0f23"; |
hash = "sha256-fFAcn3PXex+yjLUehbKEKcLESpnOPRJ0iUVkxy1xJgM="; |
||||||
}; |
}; |
||||||
|
|
||||||
checkInputs = [ pytest-cov pytestCheckHook ]; |
propagatedBuildInputs = [ |
||||||
|
numpy |
||||||
|
pyparsing |
||||||
|
]; |
||||||
|
|
||||||
meta = { |
checkInputs = [ |
||||||
homepage = "https://www.reflectometry.org/danse/software.html"; |
pytestCheckHook |
||||||
description = "an extensible periodic table of the elements prepopulated with data important to neutron and x-ray scattering experiments"; |
]; |
||||||
license = lib.licenses.publicDomain; |
|
||||||
maintainers = with lib.maintainers; [ rprospero ]; |
pythonImportsCheck = [ |
||||||
|
"periodictable" |
||||||
|
]; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "Extensible periodic table of the elements"; |
||||||
|
homepage = "https://github.com/pkienzle/periodictable"; |
||||||
|
license = licenses.publicDomain; |
||||||
|
maintainers = with maintainers; [ rprospero ]; |
||||||
}; |
}; |
||||||
} |
} |
||||||
|
@ -0,0 +1,44 @@ |
|||||||
|
{ lib, buildGoModule, fetchFromGitHub, less, more, installShellFiles, testVersion, jira-cli-go }: |
||||||
|
|
||||||
|
buildGoModule rec { |
||||||
|
pname = "jira-cli-go"; |
||||||
|
version = "0.3.0"; |
||||||
|
|
||||||
|
src = fetchFromGitHub { |
||||||
|
owner = "ankitpokhrel"; |
||||||
|
repo = "jira-cli"; |
||||||
|
rev = "v${version}"; |
||||||
|
sha256 = "sha256-sPoFv3Gzue5H6TJuQZJvqB/Dx/URp9Kt2UuIvKSnAxg="; |
||||||
|
}; |
||||||
|
|
||||||
|
vendorSha256 = "sha256-UO30/D65vpu3PgEsfSDL3nYgkwo5Cj+1WKiokk7KKKg="; |
||||||
|
|
||||||
|
ldflags = [ |
||||||
|
"-s" "-w" |
||||||
|
"-X github.com/ankitpokhrel/jira-cli/internal/version.GitCommit=${src.rev}" |
||||||
|
"-X github.com/ankitpokhrel/jira-cli/internal/version.SourceDateEpoch=0" |
||||||
|
"-X github.com/ankitpokhrel/jira-cli/internal/version.Version=${version}" |
||||||
|
]; |
||||||
|
|
||||||
|
checkInputs = [ less more ]; # Tests expect a pager in $PATH |
||||||
|
|
||||||
|
passthru.tests.version = testVersion { |
||||||
|
package = jira-cli-go; |
||||||
|
command = "jira version"; |
||||||
|
inherit version; |
||||||
|
}; |
||||||
|
|
||||||
|
nativeBuildInputs = [ installShellFiles ]; |
||||||
|
postInstall = '' |
||||||
|
installShellCompletion --cmd jira \ |
||||||
|
--bash <($out/bin/jira completion bash) \ |
||||||
|
--zsh <($out/bin/jira completion zsh) |
||||||
|
''; |
||||||
|
|
||||||
|
meta = with lib; { |
||||||
|
description = "Feature-rich interactive Jira command line"; |
||||||
|
homepage = "https://github.com/ankitpokhrel/jira-cli"; |
||||||
|
license = licenses.mit; |
||||||
|
maintainers = with maintainers; [ bryanasdev000 ]; |
||||||
|
}; |
||||||
|
} |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue