- let nixpkgs = import <nixpkgs>;
- nixpkgs0 = nixpkgs {
- crossSystem = (import <nixpkgs> {}).lib.systems.examples.musl64;
- overlays = [(self: super: {
- musl = self.stdenv.mkDerivation {
- name = "musl-includeos";
- src = builtins.fetchGit {
- url = "git://git.musl-libc.org/musl/";
- ref = "v1.1.18";
- };
- # FIXME: don't hardcode!
- prePatch = ''
- cp /home/manu/vcs/IncludeOS/api/syscalls.h src/internal/includeos_syscalls.h
- cp /home/manu/vcs/IncludeOS/etc/musl/syscall.h src/internal/
- rm -f arch/x86_64/syscall_arch.h
- rm -f arch/i386/syscall_arch.h
- '';
- patches = [
- # FIXME: don't hardcode?
- ../etc/musl/musl.patch
- ../etc/musl/endian.patch
- ];
- configureFlags = [
- "--disable-shared"
- "--enable-debug"
- ];
- };
- })];
- };
- in nixpkgs0.pkgs.libcxx