From 160c5e93766a67d41452eb248d0d6f848d30f03b Mon Sep 17 00:00:00 2001 From: Alvar Penning Date: Tue, 24 Nov 2020 14:36:19 +0100 Subject: [PATCH] platformio: 5.0.2 -> 5.0.3 In addition to the version change, the source is managed in a central location, since previously the same change had to be made in two places. --- pkgs/development/arduino/platformio/chrootenv.nix | 12 ++---------- pkgs/development/arduino/platformio/core.nix | 13 +++---------- pkgs/development/arduino/platformio/default.nix | 14 ++++++++++++-- 3 files changed, 17 insertions(+), 22 deletions(-) diff --git a/pkgs/development/arduino/platformio/chrootenv.nix b/pkgs/development/arduino/platformio/chrootenv.nix index 81cc8f371f4f..72384c0994a2 100644 --- a/pkgs/development/arduino/platformio/chrootenv.nix +++ b/pkgs/development/arduino/platformio/chrootenv.nix @@ -1,11 +1,11 @@ -{ lib, buildFHSUserEnv, fetchFromGitHub }: +{ lib, buildFHSUserEnv, version, src }: let pio-pkgs = pkgs: let python = pkgs.python3.override { packageOverrides = self: super: { - platformio = self.callPackage ./core.nix { }; + platformio = self.callPackage ./core.nix { inherit version src; }; }; }; in (with pkgs; [ @@ -19,14 +19,6 @@ let platformio ]); - src = fetchFromGitHub { - owner = "platformio"; - repo = "platformio-core"; - rev = "v5.0.2"; - sha256 = "1hbw8nbllyj0xyx1rz2chx9vyqf9949dcdx4v9hnfbsjwwpcfi0a"; - }; - - in buildFHSUserEnv { name = "platformio"; diff --git a/pkgs/development/arduino/platformio/core.nix b/pkgs/development/arduino/platformio/core.nix index 42e1e49b41fb..a039314d753d 100644 --- a/pkgs/development/arduino/platformio/core.nix +++ b/pkgs/development/arduino/platformio/core.nix @@ -1,9 +1,10 @@ -{ stdenv, lib, buildPythonApplication, fetchFromGitHub, fetchpatch +{ stdenv, lib, buildPythonApplication, fetchpatch , bottle, click, colorama, semantic-version , lockfile, pyserial, requests , tabulate, pyelftools, marshmallow , pytest, tox, jsondiff , git, spdx-license-list-data +, version, src }: let @@ -75,15 +76,7 @@ let in buildPythonApplication rec { pname = "platformio"; - version = "5.0.2"; - - # pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964 - src = fetchFromGitHub { - owner = "platformio"; - repo = "platformio-core"; - rev = "v${version}"; - sha256 = "1hbw8nbllyj0xyx1rz2chx9vyqf9949dcdx4v9hnfbsjwwpcfi0a"; - }; + inherit version src; propagatedBuildInputs = [ bottle click colorama git lockfile diff --git a/pkgs/development/arduino/platformio/default.nix b/pkgs/development/arduino/platformio/default.nix index 280fd496650c..248d07adf6e1 100644 --- a/pkgs/development/arduino/platformio/default.nix +++ b/pkgs/development/arduino/platformio/default.nix @@ -1,11 +1,21 @@ -{ newScope }: +{ newScope, fetchFromGitHub }: let callPackage = newScope self; + version = "5.0.3"; + + # pypi tarballs don't contain tests - https://github.com/platformio/platformio-core/issues/1964 + src = fetchFromGitHub { + owner = "platformio"; + repo = "platformio-core"; + rev = "v${version}"; + sha256 = "0sf5dy0cmhy66rmk0hq1by7nrmf7qz0a99hrk55dpbp6r6vnk3hw"; + }; + self = { - platformio-chrootenv = callPackage ./chrootenv.nix { }; + platformio-chrootenv = callPackage ./chrootenv.nix { inherit version src; }; }; in self