mozilla / nixpkgs-mozilla

Mozilla overlay for Nixpkgs.
MIT License
527 stars 129 forks source link

Exit Code 1 Can Not Build Derivation #211

Closed ryanpeach closed 4 years ago

ryanpeach commented 4 years ago

build error

building Nix...
building the system configuration...
these derivations will be built:
  /nix/store/047nbs7hzqw1zwz4k3iac1s1qgg4sqf2-moz_overlay_shell.drv
  /nix/store/yq7zwvjwsyxgvc1lmhd7dhnh8yry12hx-system-path.drv
  /nix/store/0jsvsxq1g4lyj73a2985wrzl9dqfx8qw-unit-systemd-fsck-.service.drv
  /nix/store/4mmz5nljsrhkasbfyl2ihicp7x500mqh-unit-polkit.service.drv
  /nix/store/mvh9d40ap7p6s3g5inc0rg6yjwjj04fm-dbus-1.drv
  /nix/store/s7nvs8qhyycf3rgxjaclpzc4a950gz2y-unit-dbus.service.drv
  /nix/store/6m25ryd11ir55v9vgzfcamq9hwxz02sj-system-units.drv
  /nix/store/ibvds8skl80w5qx57jf9fwg1i9kbxg2k-set-environment.drv
  /nix/store/jmvh45b1aci29v5sdrkickchnwizx5ix-etc-profile.drv
  /nix/store/jnp2nl7ypkb89bz6q5q4wr3n9a0c0cgs-etc-zshenv.drv
  /nix/store/b0fgiikq280r6s53vsp0ps8kc9h5hzsf-unit-emacs.service.drv
  /nix/store/qp0bppzmji41rn3d3fspmqhzv6pyz28w-unit-dbus.service.drv
  /nix/store/ljz0rij2s3i4in434q21bsfma374g884-user-units.drv
  /nix/store/pj3vx2w0cv14lymfdcvg5d6ynm523qh6-etc.drv
  /nix/store/065wqr1ssmqpn0agsvsln3fcpyqv1qrk-nixos-system-starlabs-19.09.891.80b42e630b2.drv
building '/nix/store/047nbs7hzqw1zwz4k3iac1s1qgg4sqf2-moz_overlay_shell.drv'...
unpacking sources
variable $src or $srcs should point to the source
builder for '/nix/store/047nbs7hzqw1zwz4k3iac1s1qgg4sqf2-moz_overlay_shell.drv' failed with exit code 1
cannot build derivation '/nix/store/yq7zwvjwsyxgvc1lmhd7dhnh8yry12hx-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/065wqr1ssmqpn0agsvsln3fcpyqv1qrk-nixos-system-starlabs-19.09.891.80b42e630b2.drv': 1 dependencies couldn't be built
error: build of '/nix/store/065wqr1ssmqpn0agsvsln3fcpyqv1qrk-nixos-system-starlabs-19.09.891.80b42e630b2.drv' failed

/etc/nixos/common.nix

# Edit this configuration file to define what should be installed on
# your system.  Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).

{ config, pkgs, ... }:

{

  # The global useDHCP flag is deprecated, therefore explicitly set to false here.
  # Per-interface useDHCP will be mandatory in the future, so this generated config
  # replicates the default behaviour.
  networking.useDHCP = false;
  networking.interfaces.wlp1s0.useDHCP = true;

  # Configure network proxy if necessary
  # networking.proxy.default = "http://user:password@proxy:port/";
  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

  # Select internationalisation properties.
  i18n = {
    consoleFont = "Lat2-Terminus16";
    consoleKeyMap = "us";
    defaultLocale = "en_US.UTF-8";
  };

  # Set your time zone.
  time.timeZone = "America/New_York";

  # List packages installed in system profile. To search, run:
  # $ nix search wget
  environment.systemPackages = with pkgs; [
      hledger                          # For finances
      mmv                              # Batch move utility
      calibre                          # Books
      gcc                              # Standard compiler
      gnumake                          # Makefiles
      libffi
      wget                             # Downloader
      vim                              # Minimal text editor
      tmux                             # Multiplexing
      tor                              # Tor Protocol
      brave                            # Web Browser
      fortune                          # Funny sayings
      figlet                           # Big Font
      cowsay                           # Funny Cow
      screenfetch                      # Show linux info
      lolcat                           # Colors
      emacs                            # OS
      git                              # Version control system
      stow                             # Dotfiles Manager
      unzip                            # Unzips packages
      feh                              # Wallpaper Manager
      wine                             # Windows
      riot-desktop                     # Messaging
      xcompmgr                         # Window Fading
      unclutter                        # Gets rid of mouse

      # Media
      mpv                              # Media Player
      python37Packages.mps-youtube     # Youtube from terminal
      spotify # spotify-tui                      # TODO: Spotify
      steam                            # Steam

      # Rust
      (import ./extra/rust.nix)
      # rustc                            # TODO: Rust Programming Language
      # rustup                           # Rust updater
      # cargo                            # Rust language package manager
      # rustfmt                          # Rust linter

      # Zsh
      zsh-powerlevel9k

      # Xmonad
      xlibs.xmessage
      haskellPackages.ghc
      haskellPackages.xmonad-contrib
      haskellPackages.xmonad-extras
      haskellPackages.xmonad-wallpaper
      haskellPackages.xmonad
      haskellPackages.xmobar

      # Haskell Emacs
      haskellPackages.apply-refact
      haskellPackages.hlint
      haskellPackages.stylish-haskell
      haskellPackages.hasktags
      haskellPackages.hoogle

      thefuck                          # Corrects bad bash
      ranger                           # TODO: File Browser
      # weechat                          # TODO: IRC & Matrix
      # weechat-matrix-bridge            # For the weechat matrix library
      dmenu                            # Launch bar
      rxvt_unicode                     # TODO: Terminal Emulator
      bc                               # Basic Calculator
      scrot                            # TODO: Screenshot capturing
      physlock                         # Screen locker
      stack                            # Haskell Environment Handling
      ispell                           # Spelling
      xfontsel                         # Fonts
      xlsfonts                         # Fonts
      xclip                            # Clipboard command line util
      xautolock                        # To lock the screen

      # Wifi
      networkmanager                   # For graphical wifi management
      # gnome.nm-applet

      # Python 3
      python37
      # python36Packages.poetry
      python37Packages.virtualenv
      python37Packages.virtualenvwrapper
      python37Packages.yapf
      python37Packages.flake8
      python37Packages.rope
      python37Packages.mypy

      pulseaudioFull                   # TODO: Audio
      openjdk                          # JDK
      gradle                           # Java package manager
  ];

  # IN CASE OF EMERGENCY
  # nixos-help, nixos-option
  # nix-env -qaP
  services.nixosManual.showManual = true;

  # GUI Network Manager
  # nmcli device wifi rescan
  # nmcli device wifi list
  # nmcli device wifi connect <SSID> password <password>
  networking.networkmanager.enable = true;

  # Some programs need SUID wrappers, can be configured further or are
  # started in user sessions.
  # programs.mtr.enable = true;
  # programs.gnupg.agent = { enable = true; enableSSHSupport = true; };

  # Collect nix store garbage and optimize daily
  nix.gc.automatic = true;
  nix.autoOptimiseStore = true;

  # Enable Adobe Flash
  nixpkgs.config.firefox.enableAdobeFlash = true;

  # Zsh & Bash
  programs.zsh = {
    enable = true;
    ohMyZsh = {
      enable = true;
    };
    promptInit = "source ${pkgs.zsh-powerlevel9k}/share/zsh-powerlevel9k/powerlevel9k.zsh-theme";
  };

  # Emacs
  services.emacs.enable = true;
  services.emacs.defaultEditor = true;
  services.emacs.install = true;

  # Xserver
  services.xserver = {

    # Enable the X11 windowing system.
    enable = true;
    layout = "us";
    xkbOptions = "eurosign:e";

    # X Auto Lock
    xautolock.enable = true;
    xautolock.time = 15;
    xautolock.notify = 10;

    # Display Manager
    displayManager = {
      sddm.enable = true;
      sddm.autoNumlock = true;
    };

    # Desktop Manager
    desktopManager = {
      plasma5.enable = false;
      xterm.enable = false;
    };

    # XMonad
    windowManager.xmonad = {
      enable = true;
      enableContribAndExtras = true;
      extraPackages = haskellPackages: [
        haskellPackages.xmonad-contrib
        haskellPackages.xmonad-extras
        haskellPackages.xmonad-wallpaper
        haskellPackages.xmonad
        haskellPackages.xmobar
      ];
    };

    windowManager.default = "xmonad";
  };

  # Fonts
  fonts = {
    enableFontDir = true;
    enableGhostscriptFonts = true;
    fonts = with pkgs; [
      ubuntu_font_family
      liberation_ttf
      powerline-fonts
    ];
  };

  # Define a user account. Don't forget to set a password with ‘passwd’.
  users.users.rgpeach10 = {
    isNormalUser = true;
    extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
    shell = pkgs.zsh;
  };

  # Weechat
  # services.weechat.enable = true;
  # packageOverrides = pkgs: rec {
  #   weechat = pkgs.weechat.override {
  #     configure = {availablePlugins}: {
  #       plugins = with availablePlugins: [weechat-matrix-bridge];
  #     };
  #   };
  # };

  # This value determines the NixOS release with which your system is to be
  # compatible, in order to avoid breaking some software such as database
  # servers. You should change this only after NixOS release notes say you
  # should.
  system.stateVersion = "19.09"; # Did you read the comment?

  # OpenVPN
  services.openvpn.servers = {
    nordVPN = { config = '' config /etc/nixos/openvpn/usa.ovpn ''; };
    # nordVPNP2P = { config = '' config /etc/nixos/openpn/usa.p2p.ovpn ''; };
  };

}

/etc/nixos/extras/rust.nix

let
  moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
  nixpkgs = import <nixpkgs> { overlays = [ moz_overlay ]; };
in
  with nixpkgs;
  stdenv.mkDerivation {
    name = "moz_overlay_shell";
    buildInputs = [
      nixpkgs.latest.rustChannels.nightly.rust
      ];
  }
nbp commented 4 years ago

I do not understand why you would not add the overlay to your NixOS configuration, and then just list latest.rustChannels.nightly.rust in the list of programs to install.

  nixpkgs.overlays = [
     (import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz))
  ];
ryanpeach commented 4 years ago

Im just not good at the nix language yet. Its pretty hard.

glasserc commented 4 years ago

OK, does doing that resolve your use case/can we close this issue? I think that defining extras/rust.nix and putting it in systemPackages is equivalent to trying to define a package/derivation, which is why you're getting the error message you are about not having a $src. I don't think this is the way you want to go for this kind of situation.