Skip to content

Static executables with Musl libc example doesn't work #780

@codygman

Description

@codygman

https://input-output-hk.github.io/haskell.nix/tutorials/cross-compilation/#static-executables-with-musl-libc

{ pkgs ? import <nixpkgs> {} }:
let
  haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz);
  musl64 = haskellNix { pkgs = pkgs.pkgsCross.musl64; };
in
  musl64.haskellPackages.bench.components.exes.bench

In nix repl:

[cody@nixos:~/smurf]$ nix repl
Welcome to Nix version 2.3.6. Type :? for help.

nix-repl> pkgs = import <nixpkgs> {}

nix-repl> haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) 

nix-repl>  musl64 = haskellNix { pkgs = pkgs.pkgsCross.musl64; }

nix-repl> musl64.haskellPackages.bench.components.exes.bench
error: attribute 'haskellPackages' missing, at (string):1:1

nix-repl> musl64.                                            
musl64.allOverlays  musl64.overlays
musl64.config       musl64.pkgs
musl64.nixpkgsArgs  musl64.sources

nix-repl> musl64.pkgs.haskellPackages.bench.compile
musl64.pkgs.haskellPackages.bench.compileBuildDriverPhase
musl64.pkgs.haskellPackages.bench.compiler

nix-repl> musl64.pkgs.haskellPackages.bench.compile
musl64.pkgs.haskellPackages.bench.compileBuildDriverPhase
musl64.pkgs.haskellPackages.bench.compiler

nix-repl> musl64.pkgs.haskellPackages.bench.        

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions