spacepaste

  1.  
  2. let nixpkgs = import <nixpkgs>;
  3. nixpkgs0 = nixpkgs {
  4. crossSystem = (import <nixpkgs> {}).lib.systems.examples.musl64;
  5. overlays = [(self: super: {
  6. musl = self.stdenv.mkDerivation {
  7. name = "musl-includeos";
  8. src = builtins.fetchGit {
  9. url = "git://git.musl-libc.org/musl/";
  10. ref = "v1.1.18";
  11. };
  12. # FIXME: don't hardcode!
  13. prePatch = ''
  14. cp /home/manu/vcs/IncludeOS/api/syscalls.h src/internal/includeos_syscalls.h
  15. cp /home/manu/vcs/IncludeOS/etc/musl/syscall.h src/internal/
  16. rm -f arch/x86_64/syscall_arch.h
  17. rm -f arch/i386/syscall_arch.h
  18. '';
  19. patches = [
  20. # FIXME: don't hardcode?
  21. ../etc/musl/musl.patch
  22. ../etc/musl/endian.patch
  23. ];
  24. configureFlags = [
  25. "--disable-shared"
  26. "--enable-debug"
  27. ];
  28. };
  29. })];
  30. };
  31. in nixpkgs0.pkgs.libcxx
  32.