treewide: name -> pname where possible

Changes "name = '...-${version}" -> "pname = '...'" syntax everywhere
that is easy.
This matches current best nixpkgs convention.
The nixpkgs standard derivation will convert this to name =
"${pname}-${version}" automatically.
This also has the added benefit of adding the version to the filepath
for several packages that didn't have it before.

The only remaining files are ./artiq-full/extras.nix &
./artiq-fast/pkgs/python-deps.nix.
extras.nix had a
semi-confusing function that I didn't want to mess with.
pull/37/head
Drew Risinger 2020-12-14 20:30:21 -05:00 committed by Sebastien Bourdeauducq
parent beb99234fe
commit ca28925120
10 changed files with 44 additions and 32 deletions

View File

@ -44,7 +44,8 @@ let
condaNoarch = {
conda-pythonparser = import ./conda/build.nix { inherit pkgs; } {
name = "conda-pythonparser";
pname = "conda-pythonparser";
inherit (pythonDeps.pythonparser) version;
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "pythonparser";
inherit (pythonDeps.pythonparser) version src;
@ -53,7 +54,8 @@ let
};
};
conda-sipyco = import ./conda/build.nix { inherit pkgs; } {
name = "conda-sipyco";
pname = "conda-sipyco";
inherit (pythonDeps.sipyco) version;
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "sipyco";
inherit (pythonDeps.sipyco) version src;
@ -61,14 +63,16 @@ let
};
};
conda-quamash = import ./conda/build.nix { inherit pkgs; } {
name = "conda-quamash";
pname = "conda-quamash";
inherit (pkgs.python3Packages.quamash) version;
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "quamash";
inherit (pkgs.python3Packages.quamash) version src;
};
};
conda-qasync = import ./conda/build.nix { inherit pkgs; } {
name = "conda-qasync";
pname = "conda-qasync";
inherit (pythonDeps.qasync) version;
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "qasync";
inherit (pythonDeps.qasync) version src;
@ -80,7 +84,8 @@ let
};
conda-artiq = import ./conda/artiq.nix { inherit pkgs; };
conda-asyncserial = import ./conda/build.nix { inherit pkgs; } {
name = "conda-asyncserial";
pname = "conda-asyncserial";
inherit (pythonDeps.asyncserial) version;
src = import ./conda/fake-source.nix { inherit pkgs; } {
name = "asyncserial";
inherit (pythonDeps.asyncserial) version src;

View File

@ -1,7 +1,7 @@
{ stdenv, lib, pythonDeps, fetchgit, git, python3Packages, qt5, binutils-or1k, binutils-arm, llvm-or1k, llvmlite-artiq, libartiq-support, lit, outputcheck }:
python3Packages.buildPythonPackage rec {
name = "artiq-${version}";
pname = "artiq";
version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
src = import ./artiq-src.nix { inherit fetchgit; };

View File

@ -1,6 +1,6 @@
{ stdenv, fetchgit, git, rustc }:
stdenv.mkDerivation rec {
name = "libartiq-support-${version}";
pname = "libartiq-support";
version = import ./artiq-version.nix { inherit stdenv fetchgit git; };
src = import ./artiq-src.nix { inherit fetchgit; };

View File

@ -25,10 +25,10 @@ let
'';
in
stdenv.mkDerivation rec {
name = "llvm-or1k";
pname = "llvm-or1k";
version = "6.0.0";
passthru.llvm-src = llvm-src;
src = llvm-clang-src;
version = "6.0.0";
buildInputs = [ perl groff cmake libxml2 python libffi ] ++ stdenv.lib.optional stdenv.isLinux valgrind;

View File

@ -1,6 +1,6 @@
{ stdenv, fetchFromGitHub, llvm-or1k, makeWrapper, python3, ncurses, zlib, python3Packages }:
python3Packages.buildPythonPackage rec {
name = "llvmlite-artiq";
pname = "llvmlite-artiq";
version = "0.23.0.dev";
src = fetchFromGitHub {
rev = "158f9d3a898dbf055ca513d69505df288c681fea";

View File

@ -1,7 +1,7 @@
{ stdenv, fetchFromGitHub, autoreconfHook, libftdi, libusb1, pkgconfig, hidapi }:
stdenv.mkDerivation rec {
name = "openocd-mlabs-${version}";
pname = "openocd-mlabs";
version = "0.10.0";
src = fetchFromGitHub {

View File

@ -3,7 +3,7 @@
rec {
# User dependencies
sipyco = python3Packages.buildPythonPackage rec {
name = "sipyco";
pname = "sipyco";
version = "1.1";
src = fetchFromGitHub {
owner = "m-labs";
@ -15,7 +15,7 @@ rec {
};
asyncserial = python3Packages.buildPythonPackage rec {
name = "asyncserial";
pname = "asyncserial";
version = "0.1";
src = fetchFromGitHub {
owner = "m-labs";
@ -27,7 +27,7 @@ rec {
};
pythonparser = python3Packages.buildPythonPackage rec {
name = "pythonparser";
pname = "pythonparser";
version = "1.3";
src = fetchFromGitHub {
owner = "m-labs";
@ -40,7 +40,7 @@ rec {
};
pyqtgraph-qt5 = python3Packages.buildPythonPackage rec {
name = "pyqtgraph_qt5-${version}";
pname = "pyqtgraph_qt5";
version = "0.11.0";
doCheck = false;
pythonImportsCheck = [ "pyqtgraph" ];
@ -74,7 +74,8 @@ rec {
# Development/firmware dependencies
artiq-netboot = python3Packages.buildPythonPackage rec {
name = "artiq-netboot";
pname = "artiq-netboot";
version = "unstable-2020-10-15";
src = fetchgit {
url = "https://git.m-labs.hk/m-labs/artiq-netboot.git";
@ -84,7 +85,8 @@ rec {
};
misoc = python3Packages.buildPythonPackage {
name = "misoc";
pname = "misoc";
version = if misoc-new then "unstable-2020-10-06" else "unstable-2020-05-29";
src = if misoc-new
then (fetchFromGitHub {
@ -116,7 +118,8 @@ rec {
};
migen = python3Packages.buildPythonPackage rec {
name = "migen";
pname = "migen";
version = "unstable-2020-11-11";
src = fetchFromGitHub {
owner = "m-labs";
@ -136,7 +139,8 @@ rec {
};
microscope = python3Packages.buildPythonPackage rec {
name = "microscope";
pname = "microscope";
version = "unstable-2019-05-17";
src = fetchFromGitHub {
owner = "m-labs";
@ -156,7 +160,8 @@ rec {
};
jesd204b = python3Packages.buildPythonPackage rec {
name = "jesd204b";
pname = "jesd204b";
version = "0.11";
src = fetchFromGitHub {
owner = "m-labs";
@ -193,7 +198,8 @@ rec {
};
ramda = python3Packages.buildPythonPackage {
name = "ramda";
pname = "ramda";
version = "unstable-2019-02-01";
src = fetchFromGitHub {
owner = "peteut";
@ -221,7 +227,8 @@ rec {
};
migen-axi = python3Packages.buildPythonPackage {
name = "migen-axi";
pname = "migen-axi";
version = "unstable-2020-11-11";
src = fetchFromGitHub {
owner = "peteut";

View File

@ -7,7 +7,7 @@ rustPlatform.buildRustPackage rec {
# Note: we can't build cargo 1.28.0 because rustc tightened the borrow checker rules and broke
# backward compatibility, which affects old cargo versions.
# There are also issues with asm/llvm_asm with recent rustc and cargo versions prior to 1.39.
name = "cargo-${version}";
pname = "cargo";
version = "1.39.0";
src = fetchurl {
url = "https://static.rust-lang.org/dist/rustc-1.39.0-src.tar.gz";

View File

@ -26,7 +26,7 @@ let
in
stdenv.mkDerivation {
name = "rustc-${version}";
pname = "rustc";
inherit version;
inherit src;

View File

@ -4,8 +4,8 @@ let
ise = import ./ise.nix { inherit pkgs; };
vivado = import ../artiq-fast/vivado.nix { inherit pkgs; };
buildUrukulCpld = {version, src}: pkgs.stdenv.mkDerivation {
name = "urukul-cpld-${version}";
inherit src;
pname = "urukul-cpld";
inherit src version;
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
phases = ["buildPhase" "installPhase"];
buildPhase = "python $src/urukul_impl.py";
@ -17,8 +17,8 @@ let
'';
};
buildMirnyCpld = {version, src}: pkgs.stdenv.mkDerivation {
name = "mirny-cpld-${version}";
inherit src;
pname = "mirny-cpld";
inherit src version;
buildInputs = [(pkgs.python3.withPackages(ps: [artiqpkgs.migen]))] ++ (builtins.attrValues ise);
phases = ["buildPhase" "installPhase"];
buildPhase = "python $src/mirny_impl.py";