aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/arduino
diff options
context:
space:
mode:
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/arduino')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/arduino/arduino-mk/default.nix14
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/chrootenv.nix12
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/core.nix13
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/default.nix14
4 files changed, 28 insertions, 25 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/arduino/arduino-mk/default.nix b/infra/libkookie/nixpkgs/pkgs/development/arduino/arduino-mk/default.nix
index ff7b7274ca97..cd3dd32f3806 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/arduino/arduino-mk/default.nix
+++ b/infra/libkookie/nixpkgs/pkgs/development/arduino/arduino-mk/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub }:
+{ stdenv, fetchFromGitHub, python3Packages, installShellFiles }:
stdenv.mkDerivation rec {
version = "1.6.0";
@@ -11,8 +11,16 @@ stdenv.mkDerivation rec {
sha256 = "0flpl97d2231gp51n3y4qvf3y1l8xzafi1sgpwc305vwc2h4dl2x";
};
- phases = ["installPhase"];
- installPhase = "ln -s $src $out";
+ nativeBuildInputs = [ python3Packages.wrapPython installShellFiles ];
+ propagatedBuildInputs = with python3Packages; [ pyserial ];
+ installPhase = ''
+ mkdir $out
+ cp -rT $src $out
+ installManPage *.1
+ '';
+ postFixupPhase = ''
+ wrapPythonPrograms
+ '';
meta = {
description = "Makefile for Arduino sketches";
diff --git a/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/chrootenv.nix b/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/chrootenv.nix
index 91300bda8f1c..72384c0994a2 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/chrootenv.nix
+++ b/infra/libkookie/nixpkgs/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.1";
- sha256 = "01xh61ldilg6fg95l1p870rld2xffhnl9f9ndvbi5jdn8q634pmw";
- };
-
-
in buildFHSUserEnv {
name = "platformio";
diff --git a/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/core.nix b/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/core.nix
index 835e0c692e4b..a039314d753d 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/core.nix
+++ b/infra/libkookie/nixpkgs/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.1";
-
- # 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 = "01xh61ldilg6fg95l1p870rld2xffhnl9f9ndvbi5jdn8q634pmw";
- };
+ inherit version src;
propagatedBuildInputs = [
bottle click colorama git lockfile
diff --git a/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/default.nix b/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/default.nix
index 280fd496650c..248d07adf6e1 100644
--- a/infra/libkookie/nixpkgs/pkgs/development/arduino/platformio/default.nix
+++ b/infra/libkookie/nixpkgs/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