Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: init at 2.25.0 #22499

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions mingw-w64-nix/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Maintainer: Brian McKenna <[email protected]>

_realname=nix
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=2.25.0
pkgrel=1
pkgdesc="The purely functional package manager"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url="https://nixos.org/"
license=('spdx:LGPL-2.1-or-later')
makedepends=(
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-cmake"
"${MINGW_PACKAGE_PREFIX}-meson"
"${MINGW_PACKAGE_PREFIX}-ninja"
)
depends=(
"${MINGW_PACKAGE_PREFIX}-boost"
"${MINGW_PACKAGE_PREFIX}-brotli"
"${MINGW_PACKAGE_PREFIX}-curl"
"${MINGW_PACKAGE_PREFIX}-expat"
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
"${MINGW_PACKAGE_PREFIX}-libarchive"
"${MINGW_PACKAGE_PREFIX}-libgit2"
"${MINGW_PACKAGE_PREFIX}-libsodium"
"${MINGW_PACKAGE_PREFIX}-libunistring"
"${MINGW_PACKAGE_PREFIX}-nlohmann_json"
"${MINGW_PACKAGE_PREFIX}-readline"
"${MINGW_PACKAGE_PREFIX}-sqlite3"
"${MINGW_PACKAGE_PREFIX}-termcap"
"${MINGW_PACKAGE_PREFIX}-toml11"
)
source=("https://github.com/NixOS/nix/archive/${pkgver}/${_realname}-${pkgver}.tar.gz")
sha256sums=('6bf0d862837f59dfcdecc38533cfa3851aa02dc6a1d02cb7392e47108e9dc5da')
# Nix purposely has broken symlinks (for tests) in the package.
# We have to use this form of symlinks in order to extract.
export MSYS=winsymlinks:native

prepare() {
cd "${srcdir}/${_realname}-${pkgver}"

# Remove all symlinks in the functional tests.
# Ignore the broken symlink.
rm -r src/nix-functional-tests
cp -rL tests/functional src/nix-functional-tests || true
}

build() {
MSYS2_ARG_CONV_EXCL="--prefix=" \
"${MINGW_PREFIX}"/bin/meson.exe setup \
--prefix="${MINGW_PREFIX}" \
--wrap-mode=nodownload \
--auto-features=enabled \
--buildtype=plain \
-Dlibcmd:markdown=disabled \
-Dlibcmd:readline-flavor=readline \
-Dlibexpr:gc=disabled \
-Dlibstore:seccomp-sandboxing=disabled \
-Dlibutil:cpuid=disabled \
-Ddoc-gen=false \
-Dunit-tests=false \
-Dbindings=false \
"${_realname}-${pkgver}" \
"build-${MSYSTEM}"

"${MINGW_PREFIX}"/bin/meson.exe compile -C "build-${MSYSTEM}"
}

package() {
"${MINGW_PREFIX}"/bin/meson.exe install -C "build-${MSYSTEM}" --destdir "${pkgdir}"
}
Loading