uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
29
pkgs/development/misc/avr/libc/default.nix
Normal file
29
pkgs/development/misc/avr/libc/default.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchurl, automake, autoconf }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "avr-libc";
|
||||
version = "2.0.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2";
|
||||
sha256 = "15svr2fx8j6prql2il2fc0ppwlv50rpmyckaxx38d3gxxv97zpdj";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ automake autoconf ];
|
||||
|
||||
# Make sure we don't strip the libraries in lib/gcc/avr.
|
||||
stripDebugList = [ "bin" ];
|
||||
dontPatchELF = true;
|
||||
|
||||
passthru = {
|
||||
incdir = "/avr/include";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "a C runtime library for AVR microcontrollers";
|
||||
homepage = "https://savannah.nongnu.org/projects/avr-libc/";
|
||||
license = licenses.bsd3;
|
||||
platforms = [ "avr-none" ];
|
||||
maintainers = with maintainers; [ mguentner ];
|
||||
};
|
||||
}
|
||||
33
pkgs/development/misc/avr8-burn-omat/default.nix
Normal file
33
pkgs/development/misc/avr8-burn-omat/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, stdenv, fetchurl, unzip, runtimeShell }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "avr8-burn-omat";
|
||||
version = "2.1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://avr8-burn-o-mat.aaabbb.de/AVR8_Burn-O-Mat_${lib.replaceStrings ["."] ["_"] version}.zip";
|
||||
sha256 = "02k0fd0cd3y1yqip36wr3bkxbywp8913w4y7jdg6qwqxjnii58ln";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
|
||||
# move to nix-support to not create that many symlinks..
|
||||
# TODO burnomat tries to read /usr/local/etc/avrdude.conf (but you can edit it within the settings dialog)
|
||||
installPhase = ''
|
||||
mkdir -p $out/{nix-support,bin}
|
||||
mv *.jar license_gpl-3.0.txt lib *.xml *.png $out/nix-support
|
||||
cat >> $out/bin/avr8-burn-omat << EOF
|
||||
#!${runtimeShell}
|
||||
cd $out/nix-support; exec java -jar AVR8_Burn_O_Mat.jar
|
||||
EOF
|
||||
chmod +x $out/bin/avr8-burn-omat
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "GUI tool for avrdude";
|
||||
homepage = "http://avr8-burn-o-mat.aaabbb.de/avr8_burn_o_mat_avrdude_gui_en.html";
|
||||
sourceProvenance = with sourceTypes; [ binaryBytecode ];
|
||||
license = lib.licenses.gpl3;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
35
pkgs/development/misc/breakpad/default.nix
Normal file
35
pkgs/development/misc/breakpad/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchgit }:
|
||||
let
|
||||
lss = fetchgit {
|
||||
url = "https://chromium.googlesource.com/linux-syscall-support";
|
||||
rev = "d9ad2969b369a9f1c455fef92d04c7628f7f9eb8";
|
||||
sha256 = "952dv+ZE1ge/WF5RyHmEqht+AofoRHKAeFmGasVF9BA=";
|
||||
};
|
||||
in stdenv.mkDerivation {
|
||||
pname = "breakpad";
|
||||
|
||||
version = "unstable-3b3469e";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://chromium.googlesource.com/breakpad/breakpad";
|
||||
rev = "3b3469e9ed0de3d02e4450b9b95014a4266cf2ff";
|
||||
sha256 = "bRGOBrGPK+Zxp+KK+E5MFkYlDUNVhVeInVSwq+eCAF0=";
|
||||
};
|
||||
|
||||
postUnpack = ''
|
||||
ln -s ${lss} $sourceRoot/src/third_party/lss
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace src/client/linux/handler/exception_handler.cc \
|
||||
--replace "max(16384" "max(static_cast<long>(16384)"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open-source multi-platform crash reporting system";
|
||||
homepage = "https://chromium.googlesource.com/breakpad";
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ berberman ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
35
pkgs/development/misc/datafusion/default.nix
Normal file
35
pkgs/development/misc/datafusion/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, rustPlatform
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
let
|
||||
pname = "datafusion-cli";
|
||||
version = "unstable-2022-04-08";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit pname version;
|
||||
|
||||
# TODO the crate has been yanked so not the best source
|
||||
# the repo is a workspace with a lock inside a subdirectory, making
|
||||
# compilation from github source not straightforward
|
||||
# re-evaluate strategy on release after 7.0.0
|
||||
src = fetchFromGitHub {
|
||||
owner = "apache";
|
||||
repo = "arrow-datafusion";
|
||||
rev = "9cbde6d0e30fd29f59b0a16e309bdb0843cc7c64";
|
||||
sha256 = "sha256-XXd9jvWVivOBRS0PVOU9F4RQ6MrS/q78JF4S6Htd67w=";
|
||||
};
|
||||
sourceRoot = "source/datafusion-cli";
|
||||
|
||||
cargoSha256 = "sha256-Q0SjVofl1+sex15sSU9s7PgKeHG2b0gJPSqz7YZFOVs=";
|
||||
|
||||
meta = with lib; {
|
||||
broken = stdenv.isDarwin;
|
||||
description = "cli for Apache Arrow DataFusion";
|
||||
homepage = "https://arrow.apache.org/datafusion";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ happysalada ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
33
pkgs/development/misc/h3/default.nix
Normal file
33
pkgs/development/misc/h3/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, cmake
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "h3";
|
||||
version = "3.7.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "uber";
|
||||
repo = "h3";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-MvWqQraTnab6EuDx4V0v8EvrFWHT95f2EHTL2p2kei8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [
|
||||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DENABLE_LINTING=OFF"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://h3geo.org/";
|
||||
description = "Hexagonal hierarchical geospatial indexing system";
|
||||
license = licenses.asl20;
|
||||
changelog = "https://github.com/uber/h3/raw/v${version}/CHANGELOG.md";
|
||||
platforms = platforms.all;
|
||||
maintainers = [ maintainers.kalbasit ];
|
||||
};
|
||||
}
|
||||
25
pkgs/development/misc/haskell/hasura/ci-info.nix
Normal file
25
pkgs/development/misc/haskell/hasura/ci-info.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, aeson, aeson-casing, base, fetchgit, hashable
|
||||
, hpack, lib, template-haskell, text, th-lift-instances
|
||||
, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ci-info";
|
||||
version = "0.1.0.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/hasura/ci-info-hs.git";
|
||||
sha256 = "018vfyg0y2sn497nigjrcs6b1v3i9bna06dsbvgr6wjikcl6dhh4";
|
||||
rev = "68247a83738ac4bb9f719f0e4213aeb7be9565cf";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
aeson aeson-casing base hashable template-haskell text
|
||||
th-lift-instances unordered-containers
|
||||
];
|
||||
libraryToolDepends = [ hpack ];
|
||||
prePatch = "hpack";
|
||||
homepage = "https://github.com/hasura/ci-info-hs#readme";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ lassulus ];
|
||||
}
|
||||
33
pkgs/development/misc/haskell/hasura/ekg-core.nix
Normal file
33
pkgs/development/misc/haskell/hasura/ekg-core.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, async, atomic-primops, base, containers, criterion
|
||||
, fetchgit, ghc-prim, hashable, hspec, hspec-smallcheck, HUnit
|
||||
, inspection-testing, lib, markdown-unlit, primitive, QuickCheck
|
||||
, smallcheck, text, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ekg-core";
|
||||
version = "0.1.1.7";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/hasura/ekg-core.git";
|
||||
sha256 = "1syb87iav3fgj6vqjh1izdvw4g0l4mngcyhvcg2nazisw3l685z6";
|
||||
rev = "b0cdc337ca2a52e392d427916ba3e28246b396c0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
atomic-primops base containers ghc-prim hashable inspection-testing
|
||||
primitive text unordered-containers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
async atomic-primops base containers ghc-prim hashable hspec
|
||||
hspec-smallcheck HUnit inspection-testing markdown-unlit primitive
|
||||
QuickCheck smallcheck text unordered-containers
|
||||
];
|
||||
testToolDepends = [ markdown-unlit ];
|
||||
benchmarkHaskellDepends = [ base criterion ];
|
||||
doHaddock = false;
|
||||
homepage = "https://github.com/tibbe/ekg-core";
|
||||
description = "Tracking of system metrics";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ lassulus ];
|
||||
}
|
||||
25
pkgs/development/misc/haskell/hasura/ekg-json.nix
Normal file
25
pkgs/development/misc/haskell/hasura/ekg-json.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, aeson, base, ekg-core, fetchgit, hspec, lib, text
|
||||
, unordered-containers, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "ekg-json";
|
||||
version = "0.1.0.7";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/hasura/ekg-json.git";
|
||||
sha256 = "17kd2f1695dmf5l95iz1w86hapc4f1gfrd0ld3ivffa2q5vxbi70";
|
||||
rev = "d1c5031b49a5559cf4b4f6beb0238b872890a48c";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
aeson base ekg-core text unordered-containers vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson base ekg-core hspec text unordered-containers
|
||||
];
|
||||
homepage = "https://github.com/tibbe/ekg-json";
|
||||
description = "JSON encoding of ekg metrics";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ lassulus ];
|
||||
}
|
||||
104
pkgs/development/misc/haskell/hasura/graphql-engine.nix
Normal file
104
pkgs/development/misc/haskell/hasura/graphql-engine.nix
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, aeson, aeson-casing, aeson-qq, ansi-wl-pprint
|
||||
, asn1-encoding, asn1-types, async, attoparsec, attoparsec-iso8601
|
||||
, auto-update, base, base16-bytestring, base64-bytestring, binary
|
||||
, byteorder, bytestring, case-insensitive, ci-info, conduit
|
||||
, connection, containers, cron, cryptonite, data-default-class
|
||||
, data-has, deepseq, dependent-map, dependent-sum, directory
|
||||
, either, ekg-core, ekg-json, exceptions, fast-logger, fetchgit
|
||||
, file-embed, filepath, ghc-heap-view, graphql-parser, hashable
|
||||
, hashable-time, haskell-src-meta, hedgehog, hspec, hspec-core
|
||||
, hspec-discover, hspec-expectations, hspec-expectations-lifted
|
||||
, hspec-hedgehog, hspec-wai, hspec-wai-json, http-api-data
|
||||
, http-client, http-client-tls, http-conduit, http-media
|
||||
, http-types, immortal, insert-ordered-containers, jose
|
||||
, kan-extensions, kriti-lang, lens, lens-aeson, lib, libyaml
|
||||
, lifted-async, lifted-base, list-t, memory, mime-types, mmorph
|
||||
, monad-control, monad-logger, monad-loops, monad-validate, mtl
|
||||
, mustache, mysql, mysql-simple, natural-transformation, network
|
||||
, network-uri, odbc, openapi3, optparse-applicative
|
||||
, optparse-generic, parsec, pem, pg-client, postgresql-binary
|
||||
, postgresql-libpq, postgresql-simple, pretty-simple, process
|
||||
, profunctors, psqueues, QuickCheck, quickcheck-instances, random
|
||||
, regex-tdfa, resource-pool, resourcet, retry, safe
|
||||
, safe-exceptions, scientific, semialign, semigroups, semver
|
||||
, shakespeare, some, split, Spock-core, stm, stm-containers, tagged
|
||||
, template-haskell, text, text-builder, text-conversions, th-lift
|
||||
, th-lift-instances, these, time, tls, tmp-postgres, transformers
|
||||
, transformers-base, typed-process, unix, unliftio-core
|
||||
, unordered-containers, uri-bytestring, uri-encode, url
|
||||
, utf8-string, uuid, validation, vector, vector-instances, wai
|
||||
, wai-extra, warp, websockets, witch, wreq, x509, x509-store
|
||||
, x509-system, x509-validation, yaml, zlib
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "graphql-engine";
|
||||
version = "1.0.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/hasura/graphql-engine.git";
|
||||
sha256 = "1r19qw2wxzmngb6sjpin3dk6i5r491brcb0ir4g8kw9d0ic90hpy";
|
||||
rev = "1349e6cdcfdef4b06593b48fe8e2e51b9f9c94e9";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
postUnpack = "sourceRoot+=/server; echo source root reset to $sourceRoot";
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson aeson-casing ansi-wl-pprint asn1-encoding asn1-types async
|
||||
attoparsec attoparsec-iso8601 auto-update base base16-bytestring
|
||||
base64-bytestring binary byteorder bytestring case-insensitive
|
||||
ci-info connection containers cron cryptonite data-default-class
|
||||
data-has deepseq dependent-map dependent-sum directory either
|
||||
ekg-core ekg-json exceptions fast-logger file-embed filepath
|
||||
ghc-heap-view graphql-parser hashable hashable-time http-api-data
|
||||
http-client http-client-tls http-conduit http-media http-types
|
||||
immortal insert-ordered-containers jose kan-extensions kriti-lang
|
||||
lens lens-aeson lifted-async lifted-base list-t memory mime-types
|
||||
mmorph monad-control monad-loops monad-validate mtl mustache mysql
|
||||
mysql-simple network network-uri odbc openapi3 optparse-applicative
|
||||
optparse-generic parsec pem pg-client postgresql-binary
|
||||
postgresql-libpq pretty-simple process profunctors psqueues
|
||||
QuickCheck quickcheck-instances random regex-tdfa resource-pool
|
||||
retry safe-exceptions scientific semialign semigroups semver
|
||||
shakespeare some split Spock-core stm stm-containers tagged
|
||||
template-haskell text text-builder text-conversions these time tls
|
||||
transformers transformers-base unix unordered-containers
|
||||
uri-bytestring uri-encode url utf8-string uuid validation vector
|
||||
vector-instances wai warp websockets witch wreq x509 x509-store
|
||||
x509-system x509-validation yaml zlib
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
base bytestring ekg-core kan-extensions pg-client text
|
||||
text-conversions time unix
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson aeson-casing aeson-qq async base bytestring case-insensitive
|
||||
conduit containers cron dependent-map dependent-sum ekg-core
|
||||
exceptions graphql-parser haskell-src-meta hedgehog hspec
|
||||
hspec-core hspec-discover hspec-expectations
|
||||
hspec-expectations-lifted hspec-hedgehog hspec-wai hspec-wai-json
|
||||
http-client http-client-tls http-conduit http-types
|
||||
insert-ordered-containers jose kan-extensions lens lens-aeson
|
||||
libyaml lifted-base mmorph monad-control monad-logger mtl mysql
|
||||
mysql-simple natural-transformation network network-uri odbc
|
||||
optparse-applicative parsec pg-client postgresql-libpq
|
||||
postgresql-simple process QuickCheck resource-pool resourcet safe
|
||||
safe-exceptions scientific shakespeare split Spock-core stm
|
||||
template-haskell text text-conversions th-lift th-lift-instances
|
||||
time tmp-postgres transformers transformers-base typed-process unix
|
||||
unliftio-core unordered-containers utf8-string vector wai wai-extra
|
||||
warp websockets yaml
|
||||
];
|
||||
testToolDepends = [ hspec-discover ];
|
||||
doCheck = false;
|
||||
homepage = "https://www.hasura.io";
|
||||
description = "GraphQL API over Postgres";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ lassulus ];
|
||||
|
||||
# Needs to be updated for aeson-2.0
|
||||
# https://github.com/hasura/graphql-engine/issues/8369
|
||||
hydraPlatforms = lib.platforms.none;
|
||||
broken = true;
|
||||
}
|
||||
37
pkgs/development/misc/haskell/hasura/graphql-parser.nix
Normal file
37
pkgs/development/misc/haskell/hasura/graphql-parser.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, aeson, attoparsec, base, bytestring, deepseq
|
||||
, fetchgit, hashable, hedgehog, lib, prettyprinter, scientific
|
||||
, tasty-bench, template-haskell, text, text-builder
|
||||
, th-lift-instances, unordered-containers
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "graphql-parser";
|
||||
version = "0.2.0.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/hasura/graphql-parser-hs.git";
|
||||
sha256 = "1xprr5wdhcfnbggkygz71v3za1mmkqv5mbm7h16kpsrhm1m9mpx8";
|
||||
rev = "c311bc15b8d8cef28a846d1d81b0bcc1d59bd956";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
aeson attoparsec base bytestring deepseq hashable hedgehog
|
||||
prettyprinter scientific template-haskell text text-builder
|
||||
th-lift-instances unordered-containers
|
||||
];
|
||||
testHaskellDepends = [
|
||||
attoparsec base bytestring hedgehog prettyprinter text text-builder
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
base bytestring prettyprinter tasty-bench text text-builder
|
||||
];
|
||||
homepage = "https://github.com/hasura/graphql-parser-hs";
|
||||
description = "A native Haskell GraphQL parser";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ lassulus ];
|
||||
|
||||
# Needs to be updated for aeson-2.0
|
||||
# https://github.com/hasura/graphql-engine/issues/8369
|
||||
hydraPlatforms = lib.platforms.none;
|
||||
broken = true;
|
||||
}
|
||||
41
pkgs/development/misc/haskell/hasura/kriti-lang.nix
Normal file
41
pkgs/development/misc/haskell/hasura/kriti-lang.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, aeson, aeson-pretty, alex, array, base, bytestring
|
||||
, containers, directory, fetchgit, filepath, generic-arbitrary
|
||||
, happy, hspec, hspec-core, hspec-golden, lens, lens-aeson, lib
|
||||
, megaparsec, mtl, network-uri, optparse-applicative, parsec
|
||||
, parser-combinators, pretty-simple, prettyprinter, QuickCheck
|
||||
, raw-strings-qq, safe-exceptions, scientific, text
|
||||
, unordered-containers, utf8-string, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "kriti-lang";
|
||||
version = "0.3.1";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/hasura/kriti-lang.git";
|
||||
sha256 = "09v31xp8gkc0p0gfysxyd8yb7lyb1vpgzq8550h3s3msjbapr7pj";
|
||||
rev = "0f0b153b93af5dc6c6e995c016ca4562e8438cec";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
aeson array base bytestring containers lens megaparsec mtl
|
||||
network-uri optparse-applicative parser-combinators prettyprinter
|
||||
scientific text unordered-containers utf8-string vector
|
||||
];
|
||||
libraryToolDepends = [ alex happy ];
|
||||
executableHaskellDepends = [
|
||||
aeson base bytestring containers mtl optparse-applicative
|
||||
prettyprinter text utf8-string
|
||||
];
|
||||
testHaskellDepends = [
|
||||
aeson aeson-pretty base bytestring containers directory filepath
|
||||
generic-arbitrary hspec hspec-core hspec-golden lens lens-aeson mtl
|
||||
optparse-applicative parsec pretty-simple prettyprinter QuickCheck
|
||||
raw-strings-qq safe-exceptions scientific text unordered-containers
|
||||
utf8-string vector
|
||||
];
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ lassulus ];
|
||||
}
|
||||
37
pkgs/development/misc/haskell/hasura/pg-client.nix
Normal file
37
pkgs/development/misc/haskell/hasura/pg-client.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, aeson, aeson-casing, async, attoparsec, base
|
||||
, bytestring, ekg-core, fetchgit, file-embed, hashable, hashtables
|
||||
, hasql, hasql-pool, hasql-transaction, hspec, lib, mmorph
|
||||
, monad-control, mtl, postgresql-binary, postgresql-libpq
|
||||
, resource-pool, retry, safe-exceptions, scientific, tasty-bench
|
||||
, template-haskell, text, text-builder, time, transformers-base
|
||||
, uuid, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "pg-client";
|
||||
version = "0.1.0";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/hasura/pg-client-hs.git";
|
||||
sha256 = "0ga2bj0mfng25c8kxsvi8i13pnanbnhahxvbq8ijl0bysd41g7zi";
|
||||
rev = "09b40ad8e5d16a78f5d91fe2306676f52caadbc8";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
aeson aeson-casing async attoparsec base bytestring ekg-core
|
||||
hashable hashtables mmorph monad-control mtl postgresql-binary
|
||||
postgresql-libpq resource-pool retry safe-exceptions scientific
|
||||
template-haskell text text-builder time transformers-base uuid
|
||||
vector
|
||||
];
|
||||
testHaskellDepends = [
|
||||
async base bytestring hspec mtl safe-exceptions time
|
||||
];
|
||||
benchmarkHaskellDepends = [
|
||||
base bytestring file-embed hasql hasql-pool hasql-transaction mtl
|
||||
tasty-bench text
|
||||
];
|
||||
homepage = "https://github.com/hasura/platform";
|
||||
license = lib.licenses.asl20;
|
||||
maintainers = with lib.maintainers; [ lassulus ];
|
||||
}
|
||||
24
pkgs/development/misc/haskell/hasura/pool.nix
Normal file
24
pkgs/development/misc/haskell/hasura/pool.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# This has been automatically generated by the script
|
||||
# ./update.sh. This should not be changed by hand.
|
||||
{ mkDerivation, base, fetchgit, hashable, hspec, lib, monad-control
|
||||
, stm, time, transformers, transformers-base, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "resource-pool";
|
||||
version = "0.2.3.2";
|
||||
src = fetchgit {
|
||||
url = "https://github.com/hasura/pool.git";
|
||||
sha256 = "02wa32fl5wq5fk59id54xmxiqjl564r4rhsc79xsgf2j2spj0v94";
|
||||
rev = "dc56753338e7b61220a09bed0469c6dcc5e9fb52";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
base hashable monad-control stm time transformers transformers-base
|
||||
vector
|
||||
];
|
||||
testHaskellDepends = [ base hspec ];
|
||||
homepage = "http://github.com/bos/pool";
|
||||
description = "A high-performance striped resource pooling implementation";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ lassulus ];
|
||||
}
|
||||
95
pkgs/development/misc/haskell/hasura/update.sh
Executable file
95
pkgs/development/misc/haskell/hasura/update.sh
Executable file
|
|
@ -0,0 +1,95 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p cabal2nix curl jq -I nixpkgs=.
|
||||
#
|
||||
# This script will update the hasura derivations to the latest version using
|
||||
# cabal2nix.
|
||||
#
|
||||
# Note that you should always try building hasura graphql-engine after updating it here, since
|
||||
# some of the overrides in pkgs/development/haskell/configuration-nix.nix may
|
||||
# need to be updated/changed.
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
# This is the directory of this update.sh script.
|
||||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
# graphql-engine derivation created with cabal2nix.
|
||||
engine_derivation_file="${script_dir}/graphql-engine.nix"
|
||||
parser_derivation_file="${script_dir}/graphql-parser.nix"
|
||||
ciinfo_derivation_file="${script_dir}/ci-info.nix"
|
||||
pgclient_derivation_file="${script_dir}/pg-client.nix"
|
||||
pool_derivation_file="${script_dir}/pool.nix"
|
||||
ekgcore_derivation_file="${script_dir}/ekg-core.nix"
|
||||
ekgjson_derivation_file="${script_dir}/ekg-json.nix"
|
||||
kritilang_derivation_file="${script_dir}/kriti-lang.nix"
|
||||
|
||||
# TODO: get current revision of graphql-engine in Nixpkgs.
|
||||
# old_version="$(sed -En 's/.*\bversion = "(.*?)".*/\1/p' "$engine_derivation_file")"
|
||||
|
||||
# This is the latest release version of graphql-engine on GitHub.
|
||||
new_version=$(curl --silent "https://api.github.com/repos/hasura/graphql-engine/releases" | jq 'map(select(.prerelease | not)) | .[0].tag_name' --raw-output)
|
||||
|
||||
echo "Running cabal2nix and outputting to ${engine_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$engine_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$engine_derivation_file"
|
||||
|
||||
cabal2nix --revision "$new_version" --subpath server --maintainer lassulus --no-check "https://github.com/hasura/graphql-engine.git" >> "$engine_derivation_file"
|
||||
|
||||
echo "Running cabal2nix and outputting to ${parser_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$parser_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$parser_derivation_file"
|
||||
|
||||
cabal2nix --maintainer lassulus "https://github.com/hasura/graphql-parser-hs.git" >> "$parser_derivation_file"
|
||||
|
||||
echo "Running cabal2nix and outputting to ${ciinfo_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$ciinfo_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$ciinfo_derivation_file"
|
||||
|
||||
cabal2nix --maintainer lassulus "https://github.com/hasura/ci-info-hs.git" >> "$ciinfo_derivation_file"
|
||||
|
||||
echo "Running cabal2nix and outputting to ${pgclient_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$pgclient_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$pgclient_derivation_file"
|
||||
|
||||
cabal2nix --maintainer lassulus "https://github.com/hasura/pg-client-hs.git" >> "$pgclient_derivation_file"
|
||||
|
||||
echo "Running cabal2nix and outputting to ${pool_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$pool_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$pool_derivation_file"
|
||||
|
||||
cabal2nix --maintainer lassulus "https://github.com/hasura/pool.git" >> "$pool_derivation_file"
|
||||
|
||||
echo "Running cabal2nix and outputting to ${ekgcore_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$ekgcore_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$ekgcore_derivation_file"
|
||||
|
||||
cabal2nix --maintainer lassulus "https://github.com/hasura/ekg-core.git" >> "$ekgcore_derivation_file"
|
||||
|
||||
echo "Running cabal2nix and outputting to ${ekgjson_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$ekgjson_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$ekgjson_derivation_file"
|
||||
|
||||
cabal2nix --maintainer lassulus "https://github.com/hasura/ekg-json.git" >> "$ekgjson_derivation_file"
|
||||
|
||||
echo "Running cabal2nix and outputting to ${kritilang_derivation_file}..."
|
||||
|
||||
echo "# This has been automatically generated by the script" > "$kritilang_derivation_file"
|
||||
echo "# ./update.sh. This should not be changed by hand." >> "$kritilang_derivation_file"
|
||||
|
||||
new_kritilang_version=$(curl --silent "https://api.github.com/repos/hasura/kriti-lang/tags" | jq '.[0].name' --raw-output)
|
||||
|
||||
cabal2nix --revision "$new_kritilang_version" --maintainer lassulus "https://github.com/hasura/kriti-lang.git" >> "$kritilang_derivation_file"
|
||||
|
||||
echo "###################"
|
||||
echo "please update pkgs/servers/hasura/cli.nix vendorSha256"
|
||||
echo "please update pkgs/development/haskell-modules/configuration-common.nix graphql-engine version"
|
||||
echo "###################"
|
||||
|
||||
echo "Finished."
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{ mkDerivation, ansi-wl-pprint, base, fetchFromGitHub, lib, process, QuickCheck
|
||||
, transformers, transformers-compat
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "hercules-ci-optparse-applicative";
|
||||
version = "0.16.1.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "hercules-ci";
|
||||
repo = "optparse-applicative";
|
||||
rev = "9e2968c09a7c5b29d04578dc68d81ce5aec0591e";
|
||||
sha256 = "sha256-11MnpQjmR89gW5WY5BwsPhpk/LwSIxEEhIa4LLiCbBc=";
|
||||
};
|
||||
libraryHaskellDepends = [
|
||||
ansi-wl-pprint base process transformers transformers-compat
|
||||
];
|
||||
testHaskellDepends = [ base QuickCheck ];
|
||||
homepage = "https://github.com/hercules-ci/optparse-applicative";
|
||||
description = "Utilities and combinators for parsing command line options (fork)";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ roberth ];
|
||||
}
|
||||
26
pkgs/development/misc/loc/default.nix
Normal file
26
pkgs/development/misc/loc/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, fetchFromGitHub, rustPlatform }:
|
||||
|
||||
with rustPlatform;
|
||||
|
||||
buildRustPackage rec {
|
||||
version = "0.4.1";
|
||||
pname = "loc";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cgag";
|
||||
repo = "loc";
|
||||
rev = "v${version}";
|
||||
sha256 = "0086asrx48qlmc484pjz5r5znli85q6qgpfbd81gjlzylj7f57gg";
|
||||
};
|
||||
|
||||
cargoSha256 = "1qfqhqimp56g34bir30zgl273yssrbmwf1h8h8yvdpzkybpd92gx";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/cgag/loc";
|
||||
description = "Count lines of code quickly";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
31
pkgs/development/misc/msp430/gcc-support.nix
Normal file
31
pkgs/development/misc/msp430/gcc-support.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenvNoCC, fetchzip }:
|
||||
|
||||
let
|
||||
mspgccVersion = "6_1_1_0";
|
||||
in stdenvNoCC.mkDerivation rec {
|
||||
pname = "msp430-gcc-support-files";
|
||||
version = "1.207";
|
||||
src = fetchzip {
|
||||
url = "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPGCC/${mspgccVersion}/exports/msp430-gcc-support-files-${version}.zip";
|
||||
sha256 = "1gyi9zc5vh9c1lxd22dwvk6b17dcd17hah2rayr062p4l51kzam1";
|
||||
};
|
||||
|
||||
buildCommand = ''
|
||||
find $src/include -name '*.ld' | xargs install -Dm0644 -t $out/lib
|
||||
find $src/include -name '*.h' | xargs install -Dm0644 -t $out/include
|
||||
install -Dm0644 -t $out/include $src/include/devices.csv
|
||||
|
||||
# appease bintoolsWrapper_addLDVars, search path needed for ld scripts
|
||||
touch $out/lib/lib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = ''
|
||||
Development headers and linker scripts for TI MSP430 microcontrollers
|
||||
'';
|
||||
homepage = "https://www.ti.com/tool/msp430-gcc-opensource";
|
||||
license = licenses.bsd3;
|
||||
platforms = [ "msp430-none" ];
|
||||
maintainers = with maintainers; [ aerialx ];
|
||||
};
|
||||
}
|
||||
63
pkgs/development/misc/msp430/mspdebug.nix
Normal file
63
pkgs/development/misc/msp430/mspdebug.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{ lib, stdenv
|
||||
, fetchFromGitHub
|
||||
, autoPatchelfHook
|
||||
, libusb-compat-0_1
|
||||
, readline ? null
|
||||
, enableReadline ? true
|
||||
, hidapi ? null
|
||||
, pkg-config ? null
|
||||
, mspds ? null
|
||||
, enableMspds ? false
|
||||
}:
|
||||
|
||||
assert stdenv.isDarwin -> hidapi != null && pkg-config != null;
|
||||
assert enableReadline -> readline != null;
|
||||
assert enableMspds -> mspds != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.25";
|
||||
pname = "mspdebug";
|
||||
src = fetchFromGitHub {
|
||||
owner = "dlbeer";
|
||||
repo = "mspdebug";
|
||||
rev = "v${version}";
|
||||
sha256 = "0prgwb5vx6fd4bj12ss1bbb6axj2kjyriyjxqrzd58s5jyyy8d3c";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
nativeBuildInputs = lib.optional stdenv.isDarwin pkg-config
|
||||
++ lib.optional (enableMspds && stdenv.isLinux) autoPatchelfHook;
|
||||
buildInputs = [ libusb-compat-0_1 ]
|
||||
++ lib.optional stdenv.isDarwin hidapi
|
||||
++ lib.optional enableReadline readline;
|
||||
|
||||
postPatch = lib.optionalString stdenv.isDarwin ''
|
||||
# TODO: remove once a new 0.26+ release is made
|
||||
substituteInPlace drivers/tilib_api.c --replace .so ${stdenv.hostPlatform.extensions.sharedLibrary}
|
||||
|
||||
# Makefile only uses pkg-config if it detects homebrew
|
||||
substituteInPlace Makefile --replace brew true
|
||||
'';
|
||||
|
||||
# TODO: wrap with MSPDEBUG_TILIB_PATH env var instead of these rpath fixups in 0.26+
|
||||
runtimeDependencies = lib.optional enableMspds mspds;
|
||||
postFixup = lib.optionalString (enableMspds && stdenv.isDarwin) ''
|
||||
# autoPatchelfHook only works on linux so...
|
||||
for dep in $runtimeDependencies; do
|
||||
install_name_tool -add_rpath $dep/lib $out/bin/$pname
|
||||
done
|
||||
'';
|
||||
|
||||
installFlags = [ "PREFIX=$(out)" "INSTALL=install" ];
|
||||
makeFlags = [ "UNAME_S=$(unameS)" ] ++
|
||||
lib.optional (!enableReadline) "WITHOUT_READLINE=1";
|
||||
unameS = lib.optionalString stdenv.isDarwin "Darwin";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A free programmer, debugger, and gdb proxy for MSP430 MCUs";
|
||||
homepage = "https://dlbeer.co.nz/mspdebug/";
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ aerialx ];
|
||||
};
|
||||
}
|
||||
36
pkgs/development/misc/msp430/mspds/binary.nix
Normal file
36
pkgs/development/misc/msp430/mspds/binary.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ stdenv, lib, fetchurl, unzip, autoPatchelfHook }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
archPostfix = optionalString (stdenv.is64bit && !stdenv.isDarwin) "_64";
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "msp-debug-stack-bin";
|
||||
version = "3.15.1.1";
|
||||
src = fetchurl {
|
||||
url = "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPDS/3_15_1_001/export/MSP430_DLL_Developer_Package_Rev_3_15_1_1.zip";
|
||||
sha256 = "1m1ssrwbhqvqwbp3m4hnjyxnz3f9d4acz9vl1av3fbnhvxr0d2hb";
|
||||
};
|
||||
sourceRoot = ".";
|
||||
|
||||
libname =
|
||||
if stdenv.hostPlatform.isWindows then "MSP430${archPostfix}.dll"
|
||||
else "libmsp430${archPostfix}${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
|
||||
nativeBuildInputs = [ unzip ]
|
||||
++ lib.optional stdenv.isLinux autoPatchelfHook;
|
||||
buildInputs = [ stdenv.cc.cc ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0755 $libname $out/lib/''${libname//_64/}
|
||||
install -Dm0644 -t $out/include Inc/*.h
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Unfree binary release of the TI MSP430 FET debug driver";
|
||||
homepage = "https://www.ti.com/tool/MSPDS";
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ aerialx ];
|
||||
};
|
||||
}
|
||||
51
pkgs/development/misc/msp430/mspds/bsl430.patch
Normal file
51
pkgs/development/misc/msp430/mspds/bsl430.patch
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
diff -ruN a/Makefile b/Makefile
|
||||
--- a/Makefile 2020-06-03 16:10:18.000000000 -0700
|
||||
+++ b/Makefile 2020-07-21 18:03:12.464121056 -0700
|
||||
@@ -42,7 +42,7 @@
|
||||
|
||||
PLATFORM := $(shell uname -s)
|
||||
ifeq ($(PLATFORM),Linux)
|
||||
- CXX:= g++
|
||||
+ CXX?= g++
|
||||
|
||||
STATICOUTPUT := linux64
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
HIDOBJ := $(LIBTHIRD)/hid-libusb.o
|
||||
else
|
||||
- CXX:= clang++
|
||||
+ CXX?= clang++
|
||||
|
||||
OUTPUT := libmsp430.dylib
|
||||
STATICOUTPUT := mac64
|
||||
@@ -134,7 +134,7 @@
|
||||
$(CXX) -c -o $@ $< $(USE_PCH) $(CXXFLAGS) $(INCLUDES) $(DEFINES)
|
||||
|
||||
$(BSLLIB):
|
||||
- $(MAKE) -C ./ThirdParty/BSL430_DLL
|
||||
+ $(MAKE) -C ./ThirdParty/BSL430_DLL OUTPUT=../../$(BSLLIB)
|
||||
|
||||
install:
|
||||
cp $(OUTPUT) /usr/local/lib/
|
||||
diff -ruN a/ThirdParty/BSL430_DLL/Makefile b/ThirdParty/BSL430_DLL/Makefile
|
||||
--- a/ThirdParty/BSL430_DLL/Makefile 2019-11-18 13:16:00.000000000 -0800
|
||||
+++ b/ThirdParty/BSL430_DLL/Makefile 2020-07-21 18:02:55.987782494 -0700
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
PLATFORM := $(shell uname -s)
|
||||
ifeq ($(PLATFORM),Linux)
|
||||
- CXX:= g++
|
||||
+ CXX?= g++
|
||||
|
||||
ifdef BIT32
|
||||
CXXFLAGS += -m32
|
||||
@@ -47,7 +47,7 @@
|
||||
INCLUDES += -I$(BOOST_DIR)
|
||||
endif
|
||||
else
|
||||
- CXX:= clang++
|
||||
+ CXX?= clang++
|
||||
|
||||
ifdef BOOST_DIR
|
||||
INCLUDES += -I$(BOOST_DIR)/include
|
||||
56
pkgs/development/misc/msp430/mspds/default.nix
Normal file
56
pkgs/development/misc/msp430/mspds/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl, unzip
|
||||
, boost, pugixml
|
||||
, hidapi
|
||||
, libusb1 ? null
|
||||
}:
|
||||
|
||||
with lib;
|
||||
assert stdenv.isLinux -> libusb1 != null;
|
||||
|
||||
let
|
||||
hidapiDriver = optionalString stdenv.isLinux "-libusb";
|
||||
|
||||
in stdenv.mkDerivation {
|
||||
pname = "msp-debug-stack";
|
||||
version = "3.15.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://software-dl.ti.com/msp430/msp430_public_sw/mcu/msp430/MSPDS/3_15_1_001/export/MSPDebugStack_OS_Package_3_15_1_1.zip";
|
||||
sha256 = "1j5sljqwc20zrb50mrji4mnmw5i680qc7n0lb0pakrrxqjc9m9g3";
|
||||
};
|
||||
sourceRoot = ".";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
libName = "libmsp430${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
makeFlags = [ "OUTPUT=$(libName)" "HIDOBJ=" ];
|
||||
NIX_LDFLAGS = [ "-lpugixml" "-lhidapi${hidapiDriver}" ];
|
||||
NIX_CFLAGS_COMPILE = [ "-I${hidapi}/include/hidapi" ];
|
||||
|
||||
patches = [ ./bsl430.patch ];
|
||||
|
||||
preBuild = ''
|
||||
rm ThirdParty/src/pugixml.cpp
|
||||
rm ThirdParty/include/pugi{config,xml}.hpp
|
||||
'' + optionalString stdenv.isDarwin ''
|
||||
makeFlagsArray+=(OUTNAME="-install_name ")
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm0755 -t $out/lib $libName
|
||||
install -Dm0644 -t $out/include DLL430_v3/include/*.h
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ unzip ];
|
||||
buildInputs = [ boost hidapi pugixml ]
|
||||
++ optional stdenv.isLinux libusb1;
|
||||
|
||||
meta = {
|
||||
description = "TI MSP430 FET debug driver";
|
||||
homepage = "https://www.ti.com/tool/MSPDS";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
maintainers = with maintainers; [ aerialx ];
|
||||
};
|
||||
}
|
||||
25
pkgs/development/misc/msp430/newlib.nix
Normal file
25
pkgs/development/misc/msp430/newlib.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ stdenvNoCC, lndir, newlib, msp430GccSupport }:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "msp430-${newlib.name}";
|
||||
inherit newlib;
|
||||
inherit msp430GccSupport;
|
||||
|
||||
preferLocalBuild = true;
|
||||
allowSubstitutes = false;
|
||||
|
||||
buildCommand = ''
|
||||
mkdir $out
|
||||
${lndir}/bin/lndir -silent $newlib $out
|
||||
${lndir}/bin/lndir -silent $msp430GccSupport/include $out/${newlib.incdir}
|
||||
${lndir}/bin/lndir -silent $msp430GccSupport/lib $out/${newlib.libdir}
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit (newlib) incdir libdir;
|
||||
};
|
||||
|
||||
meta = {
|
||||
platforms = [ "msp430-none" ];
|
||||
};
|
||||
}
|
||||
52
pkgs/development/misc/newlib/default.nix
Normal file
52
pkgs/development/misc/newlib/default.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{ stdenv, fetchurl, buildPackages
|
||||
, # "newlib-nano" is what the official ARM embedded toolchain calls this build
|
||||
# configuration that prioritizes low space usage. We include it as a preset
|
||||
# for embedded projects striving for a similar configuration.
|
||||
nanoizeNewlib ? false
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "newlib";
|
||||
version = "4.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://sourceware.org/pub/newlib/newlib-${version}.tar.gz";
|
||||
sha256 = "0m01sjjyj0ib7bwlcrvmk1qkkgd66zf1dhbw716j490kymrf75pj";
|
||||
};
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
# newlib expects CC to build for build platform, not host platform
|
||||
preConfigure = ''
|
||||
export CC=cc
|
||||
'';
|
||||
|
||||
configurePlatforms = [ "build" "target" ];
|
||||
configureFlags = [
|
||||
"--host=${stdenv.buildPlatform.config}"
|
||||
|
||||
"--disable-newlib-supplied-syscalls"
|
||||
"--disable-nls"
|
||||
"--enable-newlib-retargetable-locking"
|
||||
] ++ (if !nanoizeNewlib then [
|
||||
"--enable-newlib-io-long-long"
|
||||
"--enable-newlib-register-fini"
|
||||
] else [
|
||||
"--enable-newlib-reent-small"
|
||||
"--disable-newlib-fvwrite-in-streamio"
|
||||
"--disable-newlib-fseek-optimization"
|
||||
"--disable-newlib-wide-orient"
|
||||
"--enable-newlib-nano-malloc"
|
||||
"--disable-newlib-unbuf-stream-opt"
|
||||
"--enable-lite-exit"
|
||||
"--enable-newlib-global-atexit"
|
||||
"--enable-newlib-nano-formatted-io"
|
||||
]);
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
passthru = {
|
||||
incdir = "/${stdenv.targetPlatform.config}/include";
|
||||
libdir = "/${stdenv.targetPlatform.config}/lib";
|
||||
};
|
||||
}
|
||||
36
pkgs/development/misc/or1k/newlib.nix
Normal file
36
pkgs/development/misc/or1k/newlib.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ stdenv, texinfo, flex, bison, fetchFromGitHub, crossLibcStdenv, buildPackages }:
|
||||
|
||||
crossLibcStdenv.mkDerivation {
|
||||
name = "newlib";
|
||||
src = fetchFromGitHub {
|
||||
owner = "openrisc";
|
||||
repo = "newlib";
|
||||
rev = "8ac94ca7bbe4ceddafe6583ee4766d3c15b18ac8";
|
||||
sha256 = "0hzhijmry5slpp6x12pgng8v7jil3mn18ahrhnw431lqrs1cma0s";
|
||||
};
|
||||
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
|
||||
# newlib expects CC to build for build platform, not host platform
|
||||
preConfigure = ''
|
||||
export CC=cc
|
||||
'';
|
||||
|
||||
configurePlatforms = [ "build" "target" ];
|
||||
configureFlags = [
|
||||
"--host=${stdenv.buildPlatform.config}"
|
||||
|
||||
"--disable-newlib-supplied-syscalls"
|
||||
"--disable-nls"
|
||||
"--enable-newlib-io-long-long"
|
||||
"--enable-newlib-register-fini"
|
||||
"--enable-newlib-retargetable-locking"
|
||||
];
|
||||
|
||||
dontDisableStatic = true;
|
||||
|
||||
passthru = {
|
||||
incdir = "/${stdenv.targetPlatform.config}/include";
|
||||
libdir = "/${stdenv.targetPlatform.config}/lib";
|
||||
};
|
||||
}
|
||||
38
pkgs/development/misc/rappel/default.nix
Normal file
38
pkgs/development/misc/rappel/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ fetchFromGitHub
|
||||
, libedit
|
||||
, makeWrapper
|
||||
, nasm
|
||||
, lib, stdenv
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rappel";
|
||||
version = "unstable-2019-09-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "yrp604";
|
||||
repo = "rappel";
|
||||
rev = "31a06762d34880ff2ed7176ca71bd8a6b91b10d5";
|
||||
sha256 = "0wj3hypqfrjra8mwmn32hs5qs6ic81cq3gn1v0b2fba6vkqcsqfy";
|
||||
};
|
||||
|
||||
buildInputs = [ libedit ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 -t $out/bin bin/rappel
|
||||
wrapProgram $out/bin/rappel --prefix PATH : "${nasm}/bin"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/yrp604/rappel";
|
||||
description = "A pretty janky assembly REPL";
|
||||
license = licenses.bsdOriginal;
|
||||
maintainers = [ maintainers.pamplemousse ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
294
pkgs/development/misc/resholve/README.md
Normal file
294
pkgs/development/misc/resholve/README.md
Normal file
|
|
@ -0,0 +1,294 @@
|
|||
# Using resholve's Nix API
|
||||
resholve replaces bare references (subject to a PATH search at runtime) to external commands and scripts with absolute paths.
|
||||
|
||||
This small super-power helps ensure script dependencies are declared, present, and don't unexpectedly shift when the PATH changes.
|
||||
|
||||
resholve is developed to enable the Nix package manager to package and integrate Shell projects, but its features are not Nix-specific and inevitably have other applications.
|
||||
|
||||
<!-- generated from resholve's repo; best to suggest edits there (or at least notify me) -->
|
||||
|
||||
This will hopefully make its way into the Nixpkgs manual soon, but
|
||||
until then I'll outline how to use the functions:
|
||||
- `resholve.mkDerivation` (formerly `resholvePackage`)
|
||||
- `resholve.writeScript` (formerly `resholveScript`)
|
||||
- `resholve.writeScriptBin` (formerly `resholveScriptBin`)
|
||||
- `resholve.phraseSolution` (new in resholve 0.8.0)
|
||||
|
||||
> Fair warning: resholve does *not* aspire to resolving all valid Shell
|
||||
> scripts. It depends on the OSH/Oil parser, which aims to support most (but
|
||||
> not all) Bash. resholve aims to be a ~90% sort of solution.
|
||||
|
||||
## API Concepts
|
||||
|
||||
The main difference between `resholve.mkDerivation` and other builder functions
|
||||
is the `solutions` attrset, which describes which scripts to resolve and how.
|
||||
Each "solution" (k=v pair) in this attrset describes one resholve invocation.
|
||||
|
||||
> NOTE: For most shell packages, one invocation will probably be enough:
|
||||
> - Packages with a single script will only need one solution.
|
||||
> - Packages with multiple scripts can still use one solution if the scripts
|
||||
> don't require conflicting directives.
|
||||
> - Packages with scripts that require conflicting directives can use multiple
|
||||
> solutions to resolve the scripts separately, but produce a single package.
|
||||
|
||||
`resholve.writeScript` and `resholve.writeScriptBin` support a _single_
|
||||
`solution` attrset. This is basically the same as any single solution in `resholve.mkDerivation`, except that it doesn't need a `scripts` attr (it is automatically added). `resholve.phraseSolution` also only accepts a single solution--but it _does_ still require the `scripts` attr.
|
||||
|
||||
## Basic `resholve.mkDerivation` Example
|
||||
|
||||
Here's a simple example of how `resholve.mkDerivation` is already used in nixpkgs:
|
||||
|
||||
<!-- TODO: figure out how to pull this externally? -->
|
||||
|
||||
```nix
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, resholve
|
||||
, substituteAll
|
||||
, bash
|
||||
, coreutils
|
||||
, goss
|
||||
, which
|
||||
}:
|
||||
|
||||
resholve.mkDerivation rec {
|
||||
pname = "dgoss";
|
||||
version = "0.3.16";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aelsabbahy";
|
||||
repo = "goss";
|
||||
rev = "v${version}";
|
||||
sha256 = "1m5w5vwmc9knvaihk61848rlq7qgdyylzpcwi64z84rkw8qdnj6p";
|
||||
};
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
sed -i '2i GOSS_PATH=${goss}/bin/goss' extras/dgoss/dgoss
|
||||
install -D extras/dgoss/dgoss $out/bin/dgoss
|
||||
'';
|
||||
|
||||
solutions = {
|
||||
default = {
|
||||
scripts = [ "bin/dgoss" ];
|
||||
interpreter = "${bash}/bin/bash";
|
||||
inputs = [ coreutils which ];
|
||||
fake = {
|
||||
external = [ "docker" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/aelsabbahy/goss/blob/v${version}/extras/dgoss/README.md";
|
||||
description = "Convenience wrapper around goss that aims to bring the simplicity of goss to docker containers";
|
||||
license = licenses.asl20;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ hyzual ];
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Basic `resholve.writeScript` and `resholve.writeScriptBin` examples
|
||||
|
||||
Both of these functions have the same basic API. This example is a little
|
||||
trivial for now. If you have a real usage that you find helpful, please PR it.
|
||||
|
||||
```nix
|
||||
resholvedScript = resholve.writeScript "name" {
|
||||
inputs = [ file ];
|
||||
interpreter = "${bash}/bin/bash";
|
||||
} ''
|
||||
echo "Hello"
|
||||
file .
|
||||
'';
|
||||
resholvedScriptBin = resholve.writeScriptBin "name" {
|
||||
inputs = [ file ];
|
||||
interpreter = "${bash}/bin/bash";
|
||||
} ''
|
||||
echo "Hello"
|
||||
file .
|
||||
'';
|
||||
```
|
||||
|
||||
|
||||
## Basic `resholve.phraseSolution` example
|
||||
|
||||
This function has a similar API to `writeScript` and `writeScriptBin`, except it does require a `scripts` attr. It is intended to make resholve a little easier to mix into more types of build. This example is a little
|
||||
trivial for now. If you have a real usage that you find helpful, please PR it.
|
||||
|
||||
```nix
|
||||
{ stdenv, resholve, module1 }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
# pname = "testmod3";
|
||||
# version = "unreleased";
|
||||
# src = ...;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install conjure.sh $out/bin/conjure.sh
|
||||
${resholve.phraseSolution "conjure" {
|
||||
scripts = [ "bin/conjure.sh" ];
|
||||
interpreter = "${bash}/bin/bash";
|
||||
inputs = [ module1 ];
|
||||
fake = {
|
||||
external = [ "jq" "openssl" ];
|
||||
};
|
||||
}}
|
||||
'';
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
`resholve.mkDerivation` maps Nix types/idioms into the flags and environment variables
|
||||
that the `resholve` CLI expects. Here's an overview:
|
||||
|
||||
| Option | Type | Containing |
|
||||
|--------|------|------------|
|
||||
| scripts | `<list>` | scripts to resolve (`$out`-relative paths) |
|
||||
| interpreter | `"none"` `<path>` | The absolute interpreter `<path>` for the script's shebang. The special value `none` ensures there is no shebang. |
|
||||
| inputs | `<packages>` | Packages to resolve external dependencies from. |
|
||||
| fake | `<directives>` | pretend some commands exist |
|
||||
| fix | `<directives>` | fix things we can't auto-fix/ignore |
|
||||
| keep | `<directives>` | keep things we can't auto-fix/ignore |
|
||||
| lore | `<directory>` | control nested resolution |
|
||||
| execer | `<statements>` | modify nested resolution |
|
||||
| wrapper | `<statements>` | modify nested resolution |
|
||||
| prologue | `<file>` | insert file before resolved script |
|
||||
| epilogue | `<file>` | insert file after resolved script |
|
||||
|
||||
<!-- TODO: section below is largely custom for nixpkgs, but I would LIKE to wurst it. -->
|
||||
|
||||
## Controlling resolution with directives
|
||||
|
||||
In order to resolve a script, resholve will make you disambiguate how it should
|
||||
handle any potential problems it encounters with directives. There are currently
|
||||
3 types:
|
||||
1. `fake` directives tell resholve to pretend it knows about an identifier
|
||||
such as a function, builtin, external command, etc. if there's a good reason
|
||||
it doesn't already know about it. Common examples:
|
||||
- builtins for a non-bash shell
|
||||
- loadable builtins
|
||||
- platform-specific external commands in cross-platform conditionals
|
||||
2. `fix` directives give resholve permission to fix something that it can't
|
||||
safely fix automatically. Common examples:
|
||||
- resolving commands in aliases (this is appropriate for standalone scripts
|
||||
that use aliases non-interactively--but it would prevent profile/rc
|
||||
scripts from using the latest current-system symlinks.)
|
||||
- resolve commands in a variable definition
|
||||
- resolve an absolute command path from inputs as if it were a bare reference
|
||||
3. `keep` directives tell resholve not to raise an error (i.e., ignore)
|
||||
something it would usually object to. Common examples:
|
||||
- variables used as/within the first word of a command
|
||||
- pre-existing absolute or user-relative (~) command paths
|
||||
- dynamic (variable) arguments to commands known to accept/run other commands
|
||||
|
||||
> NOTE: resholve has a (growing) number of directives detailed in `man resholve`
|
||||
> via `nixpkgs.resholve`.
|
||||
|
||||
Each of these 3 types is represented by its own attrset, where you can think
|
||||
of the key as a scope. The value should be:
|
||||
- `true` for any directives that the resholve CLI accepts as a single word
|
||||
- a list of strings for all other options
|
||||
<!--
|
||||
TODO: these should be fully-documented here, but I'm already maintaining
|
||||
more copies of their specification/behavior than I like, and continuing to
|
||||
add more at this early date will only ensure that I spend more time updating
|
||||
docs and less time filling in feature gaps.
|
||||
|
||||
Full documentation may be greatly accellerated if someone can help me sort out
|
||||
single-sourcing. See: https://github.com/abathur/resholve/issues/19
|
||||
-->
|
||||
|
||||
This will hopefully make more sense when you see it. Here are CLI examples
|
||||
from the manpage, and the Nix equivalents:
|
||||
|
||||
```nix
|
||||
# --fake 'f:setUp;tearDown builtin:setopt source:/etc/bashrc'
|
||||
fake = {
|
||||
# fake accepts the initial of valid identifier types as a CLI convenience.
|
||||
# Use full names in the Nix API.
|
||||
function = [ "setUp" "tearDown" ];
|
||||
builtin = [ "setopt" ];
|
||||
source = [ "/etc/bashrc" ];
|
||||
};
|
||||
|
||||
# --fix 'aliases $GIT:gix /bin/bash'
|
||||
fix = {
|
||||
# all single-word directives use `true` as value
|
||||
aliases = true;
|
||||
"$GIT" = [ "gix" ];
|
||||
"/bin/bash";
|
||||
};
|
||||
|
||||
# --keep 'source:$HOME /etc/bashrc ~/.bashrc'
|
||||
keep = {
|
||||
source = [ "$HOME" ];
|
||||
"/etc/bashrc" = true;
|
||||
"~/.bashrc" = true;
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
> **Note:** For now, at least, you'll need to reference the manpage to completely understand these examples.
|
||||
|
||||
## Controlling nested resolution with lore
|
||||
|
||||
Initially, resolution of commands in the arguments to command-executing
|
||||
commands was limited to one level for a hard-coded list of builtins and
|
||||
external commands. resholve can now resolve these recursively.
|
||||
|
||||
This feature combines information (_lore_) that the resholve Nix API
|
||||
obtains via binlore ([nixpkgs](../../tools/analysis/binlore), [repo](https://github.com/abathur/resholve)),
|
||||
with some rules (internal to resholve) for locating sub-executions in
|
||||
some of the more common commands.
|
||||
|
||||
- "execer" lore identifies whether an executable can, cannot,
|
||||
or might execute its arguments. Every "can" or "might" verdict requires
|
||||
either built-in rules for finding the executable, or human triage.
|
||||
- "wrapper" lore maps shell exec wrappers to the programs they exec so
|
||||
that resholve can substitute an executable's verdict for its wrapper's.
|
||||
|
||||
> **Caution:** At least when it comes to common utilities, it's best to treat
|
||||
> overrides as a stopgap until they can be properly handled in resholve and/or
|
||||
> binlore. Please report things you have to override and, if possible, help
|
||||
> get them sorted.
|
||||
|
||||
There will be more mechanisms for controlling this process in the future
|
||||
(and your reports/experiences will play a role in shaping them...) For now,
|
||||
the main lever is the ability to substitute your own lore. This is how you'd
|
||||
do it piecemeal:
|
||||
|
||||
```nix
|
||||
# --execer 'cannot:${openssl.bin}/bin/openssl can:${openssl.bin}/bin/c_rehash'
|
||||
execer = [
|
||||
/*
|
||||
This is the same verdict binlore will
|
||||
come up with. It's a no-op just to demo
|
||||
how to fiddle lore via the Nix API.
|
||||
*/
|
||||
"cannot:${openssl.bin}/bin/openssl"
|
||||
# different verdict, but not used
|
||||
"can:${openssl.bin}/bin/c_rehash"
|
||||
];
|
||||
|
||||
# --wrapper '${gnugrep}/bin/egrep:${gnugrep}/bin/grep'
|
||||
execer = [
|
||||
/*
|
||||
This is the same verdict binlore will
|
||||
come up with. It's a no-op just to demo
|
||||
how to fiddle lore via the Nix API.
|
||||
*/
|
||||
"${gnugrep}/bin/egrep:${gnugrep}/bin/grep"
|
||||
];
|
||||
```
|
||||
|
||||
|
||||
The format is fairly simple to generate--you can script your own generator if
|
||||
you need to modify the lore.
|
||||
21
pkgs/development/misc/resholve/default.nix
Normal file
21
pkgs/development/misc/resholve/default.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ callPackage
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
source = callPackage ./source.nix { };
|
||||
deps = callPackage ./deps.nix { };
|
||||
in
|
||||
rec {
|
||||
# resholve itself
|
||||
resholve = callPackage ./resholve.nix {
|
||||
inherit (source) rSrc version;
|
||||
inherit (deps.oil) oildev;
|
||||
inherit resholve-utils;
|
||||
};
|
||||
# funcs to validate and phrase invocations of resholve
|
||||
# and use those invocations to build packages
|
||||
resholve-utils = callPackage ./resholve-utils.nix {
|
||||
inherit resholve;
|
||||
};
|
||||
}
|
||||
18
pkgs/development/misc/resholve/deps.nix
generated
Normal file
18
pkgs/development/misc/resholve/deps.nix
generated
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ callPackage
|
||||
, ...
|
||||
}:
|
||||
|
||||
/*
|
||||
Notes on specific dependencies:
|
||||
- if/when python2.7 is removed from nixpkgs, this may need to figure
|
||||
out how to build oil's vendored python2
|
||||
- I'm not sure if glibcLocales is worth the addition here. It's to fix
|
||||
a libc test oil runs. My oil fork just disabled the libc tests, but
|
||||
I haven't quite decided if that's the right long-term call, so I
|
||||
didn't add a patch for it here yet.
|
||||
*/
|
||||
|
||||
rec {
|
||||
# binlore = callPackage ./binlore.nix { };
|
||||
oil = callPackage ./oildev.nix { };
|
||||
}
|
||||
131
pkgs/development/misc/resholve/oildev.nix
Normal file
131
pkgs/development/misc/resholve/oildev.nix
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, python27Packages
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, # re2c deps
|
||||
autoreconfHook
|
||||
, # py-yajl deps
|
||||
git
|
||||
, # oil deps
|
||||
readline
|
||||
, cmark
|
||||
, file
|
||||
, glibcLocales
|
||||
}:
|
||||
|
||||
rec {
|
||||
re2c = stdenv.mkDerivation rec {
|
||||
pname = "re2c";
|
||||
version = "1.0.3";
|
||||
sourceRoot = "${src.name}/re2c";
|
||||
src = fetchFromGitHub {
|
||||
owner = "skvadrik";
|
||||
repo = "re2c";
|
||||
rev = version;
|
||||
sha256 = "0grx7nl9fwcn880v5ssjljhcb9c5p2a6xpwil7zxpmv0rwnr3yqi";
|
||||
};
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
preCheck = ''
|
||||
patchShebangs run_tests.sh
|
||||
'';
|
||||
};
|
||||
|
||||
py-yajl = python27Packages.buildPythonPackage rec {
|
||||
pname = "oil-pyyajl-unstable";
|
||||
version = "2019-12-05";
|
||||
src = fetchFromGitHub {
|
||||
owner = "oilshell";
|
||||
repo = "py-yajl";
|
||||
rev = "eb561e9aea6e88095d66abcc3990f2ee1f5339df";
|
||||
sha256 = "17hcgb7r7cy8r1pwbdh8di0nvykdswlqj73c85k6z8m0filj3hbh";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
# just for submodule IIRC
|
||||
nativeBuildInputs = [ git ];
|
||||
};
|
||||
|
||||
/*
|
||||
Upstream isn't interested in packaging this as a library
|
||||
(or accepting all of the patches we need to do so).
|
||||
This creates one without disturbing upstream too much.
|
||||
*/
|
||||
oildev = python27Packages.buildPythonPackage rec {
|
||||
pname = "oildev-unstable";
|
||||
version = "2021-07-14";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "oilshell";
|
||||
repo = "oil";
|
||||
# rev == present HEAD of release/0.8.12
|
||||
rev = "799c0703d1da86cb80d1f5b163edf9369ad77cf1";
|
||||
hash = "sha256-QNSISr719ycZ1Z0quxHWzCb3IvHGj9TpogaYz20hDM4=";
|
||||
|
||||
/*
|
||||
It's not critical to drop most of these; the primary target is
|
||||
the vendored fork of Python-2.7.13, which is ~ 55M and over 3200
|
||||
files, dozens of which get interpreter script patches in fixup.
|
||||
|
||||
Note: -f is necessary to keep it from being a pain to update
|
||||
hash on rev updates. Command will fail w/o and not print hash.
|
||||
*/
|
||||
postFetch = ''
|
||||
rm -rf Python-2.7.13 benchmarks metrics py-yajl rfc gold web testdata services demo devtools cpp
|
||||
'';
|
||||
};
|
||||
|
||||
# patch to support a python package, pass tests on macOS, etc.
|
||||
patchSrc = fetchFromGitHub {
|
||||
owner = "abathur";
|
||||
repo = "nix-py-dev-oil";
|
||||
rev = "v0.8.12.2";
|
||||
hash = "sha256-+dVxzPKMGNKFE+7Ggzx9iWjjvwW2Ow3UqmjjUud9Mqo=";
|
||||
};
|
||||
patches = [
|
||||
"${patchSrc}/0001-add_setup_py.patch"
|
||||
"${patchSrc}/0002-add_MANIFEST_in.patch"
|
||||
"${patchSrc}/0004-disable-internal-py-yajl-for-nix-built.patch"
|
||||
"${patchSrc}/0006-disable_failing_libc_tests.patch"
|
||||
"${patchSrc}/0007-namespace_via_init.patch"
|
||||
"${patchSrc}/0009-avoid_nix_arch64_darwin_toolchain_bug.patch"
|
||||
];
|
||||
|
||||
buildInputs = [ readline cmark py-yajl ];
|
||||
|
||||
nativeBuildInputs = [ re2c file makeWrapper ];
|
||||
|
||||
propagatedBuildInputs = with python27Packages; [ six typing ];
|
||||
|
||||
doCheck = true;
|
||||
|
||||
preBuild = ''
|
||||
build/dev.sh all
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs asdl build core doctools frontend native oil_lang
|
||||
'';
|
||||
|
||||
/*
|
||||
We did convince oil to upstream an env for specifying
|
||||
this to support a shell.nix. Would need a patch if they
|
||||
later drop this support. See:
|
||||
https://github.com/oilshell/oil/blob/46900310c7e4a07a6223eb6c08e4f26460aad285/doctools/cmark.py#L30-L34
|
||||
*/
|
||||
_NIX_SHELL_LIBCMARK = "${cmark}/lib/libcmark${stdenv.hostPlatform.extensions.sharedLibrary}";
|
||||
|
||||
# See earlier note on glibcLocales TODO: verify needed?
|
||||
LOCALE_ARCHIVE = lib.optionalString (stdenv.buildPlatform.libc == "glibc") "${glibcLocales}/lib/locale/locale-archive";
|
||||
|
||||
# not exhaustive; just a spot-check for now
|
||||
pythonImportsCheck = [ "oil" "oil._devbuild" ];
|
||||
|
||||
meta = {
|
||||
license = with lib.licenses; [
|
||||
psfl # Includes a portion of the python interpreter and standard library
|
||||
asl20 # Licence for Oil itself
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
203
pkgs/development/misc/resholve/resholve-utils.nix
Normal file
203
pkgs/development/misc/resholve/resholve-utils.nix
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
{ lib, stdenv, resholve, binlore, writeTextFile }:
|
||||
|
||||
rec {
|
||||
/* These functions break up the work of partially validating the
|
||||
'solutions' attrset and massaging it into env/cli args.
|
||||
|
||||
Note: some of the left-most args do not *have* to be passed as
|
||||
deep as they are, but I've done so to provide more error context
|
||||
*/
|
||||
|
||||
# for brevity / line length
|
||||
spaces = l: builtins.concatStringsSep " " l;
|
||||
colons = l: builtins.concatStringsSep ":" l;
|
||||
semicolons = l: builtins.concatStringsSep ";" l;
|
||||
|
||||
/* Throw a fit with dotted attr path context */
|
||||
nope = path: msg:
|
||||
throw "${builtins.concatStringsSep "." path}: ${msg}";
|
||||
|
||||
/* Special-case directive value representations by type */
|
||||
phraseDirective = solution: env: name: val:
|
||||
if builtins.isInt val then builtins.toString val
|
||||
else if builtins.isString val then name
|
||||
else if true == val then name
|
||||
else if false == val then "" # omit!
|
||||
else if null == val then "" # omit!
|
||||
else if builtins.isList val then "${name}:${semicolons (map lib.escapeShellArg val)}"
|
||||
else nope [ solution env name ] "unexpected type: ${builtins.typeOf val}";
|
||||
|
||||
/* Build fake/fix/keep directives from Nix types */
|
||||
phraseDirectives = solution: env: val:
|
||||
lib.mapAttrsToList (phraseDirective solution env) val;
|
||||
|
||||
/* Custom ~search-path routine to handle relative path strings */
|
||||
relSafeBinPath = input:
|
||||
if lib.isDerivation input then ((lib.getOutput "bin" input) + "/bin")
|
||||
else if builtins.isString input then input
|
||||
else throw "unexpected type for input: ${builtins.typeOf input}";
|
||||
|
||||
/* Special-case value representation by type/name */
|
||||
phraseEnvVal = solution: env: val:
|
||||
if env == "inputs" then (colons (map relSafeBinPath val))
|
||||
else if builtins.isString val then val
|
||||
else if builtins.isList val then spaces val
|
||||
else if builtins.isAttrs val then spaces (phraseDirectives solution env val)
|
||||
else nope [ solution env ] "unexpected type: ${builtins.typeOf val}";
|
||||
|
||||
/* Shell-format each env value */
|
||||
shellEnv = solution: env: value:
|
||||
lib.escapeShellArg (phraseEnvVal solution env value);
|
||||
|
||||
/* Build a single ENV=val pair */
|
||||
phraseEnv = solution: env: value:
|
||||
"RESHOLVE_${lib.toUpper env}=${shellEnv solution env value}";
|
||||
|
||||
/* Discard attrs:
|
||||
- claimed by phraseArgs
|
||||
- only needed for binlore.collect
|
||||
*/
|
||||
removeUnneededArgs = value:
|
||||
removeAttrs value [ "scripts" "flags" "unresholved" ];
|
||||
|
||||
/* Verify required arguments are present */
|
||||
validateSolution = { scripts, inputs, interpreter, ... }: true;
|
||||
|
||||
/* Pull out specific solution keys to build ENV=val pairs */
|
||||
phraseEnvs = solution: value:
|
||||
spaces (lib.mapAttrsToList (phraseEnv solution) (removeUnneededArgs value));
|
||||
|
||||
/* Pull out specific solution keys to build CLI argstring */
|
||||
phraseArgs = { flags ? [ ], scripts, ... }:
|
||||
spaces (flags ++ scripts);
|
||||
|
||||
phraseBinloreArgs = value:
|
||||
let
|
||||
hasUnresholved = builtins.hasAttr "unresholved" value;
|
||||
in {
|
||||
drvs = value.inputs ++
|
||||
lib.optionals hasUnresholved [ value.unresholved ];
|
||||
strip = if hasUnresholved then [ value.unresholved ] else [ ];
|
||||
};
|
||||
|
||||
/* Build a single resholve invocation */
|
||||
phraseInvocation = solution: value:
|
||||
if validateSolution value then
|
||||
# we pass resholve a directory
|
||||
"RESHOLVE_LORE=${binlore.collect (phraseBinloreArgs value) } ${phraseEnvs solution value} ${resholve}/bin/resholve --overwrite ${phraseArgs value}"
|
||||
else throw "invalid solution"; # shouldn't trigger for now
|
||||
|
||||
injectUnresholved = solutions: unresholved: (builtins.mapAttrs (name: value: value // { inherit unresholved; } ) solutions);
|
||||
|
||||
/* Build resholve invocation for each solution. */
|
||||
phraseCommands = solutions: unresholved:
|
||||
builtins.concatStringsSep "\n" (
|
||||
lib.mapAttrsToList phraseInvocation (injectUnresholved solutions unresholved)
|
||||
);
|
||||
|
||||
/*
|
||||
subshell/PS4/set -x and : command to output resholve envs
|
||||
and invocation. Extra context makes it clearer what the
|
||||
Nix API is doing, makes nix-shell debugging easier, etc.
|
||||
*/
|
||||
phraseContext = { invokable, prep ? ''cd "$out"'' }: ''
|
||||
(
|
||||
${prep}
|
||||
PS4=$'\x1f'"\033[33m[resholve context]\033[0m "
|
||||
set -x
|
||||
: invoking resholve with PWD=$PWD
|
||||
${invokable}
|
||||
)
|
||||
'';
|
||||
phraseContextForPWD = invokable: phraseContext { inherit invokable; prep = ""; };
|
||||
phraseContextForOut = invokable: phraseContext { inherit invokable; };
|
||||
|
||||
phraseSolution = name: solution: (phraseContextForOut (phraseInvocation name solution));
|
||||
phraseSolutions = solutions: unresholved:
|
||||
phraseContextForOut (phraseCommands solutions unresholved);
|
||||
|
||||
writeScript = name: partialSolution: text:
|
||||
writeTextFile {
|
||||
inherit name text;
|
||||
executable = true;
|
||||
checkPhase = ''
|
||||
${(phraseContextForPWD (
|
||||
phraseInvocation name (
|
||||
partialSolution // {
|
||||
scripts = [ "${placeholder "out"}" ];
|
||||
}
|
||||
)
|
||||
)
|
||||
)}
|
||||
${partialSolution.interpreter} -n $out
|
||||
'';
|
||||
};
|
||||
writeScriptBin = name: partialSolution: text:
|
||||
writeTextFile rec {
|
||||
inherit name text;
|
||||
executable = true;
|
||||
destination = "/bin/${name}";
|
||||
checkPhase = ''
|
||||
${phraseContextForOut (
|
||||
phraseInvocation name (
|
||||
partialSolution // {
|
||||
scripts = [ "bin/${name}" ];
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
${partialSolution.interpreter} -n $out/bin/${name}
|
||||
'';
|
||||
};
|
||||
mkDerivation = { pname
|
||||
, src
|
||||
, version
|
||||
, passthru ? { }
|
||||
, solutions
|
||||
, ...
|
||||
}@attrs:
|
||||
let
|
||||
inherit stdenv;
|
||||
|
||||
/*
|
||||
Knock out our special solutions arg, but otherwise
|
||||
just build what the caller is giving us. We'll
|
||||
actually resholve it separately below (after we
|
||||
generate binlore for it).
|
||||
*/
|
||||
unresholved = (stdenv.mkDerivation ((removeAttrs attrs [ "solutions" ])
|
||||
// {
|
||||
inherit pname version src;
|
||||
}));
|
||||
in
|
||||
/*
|
||||
resholve in a separate derivation; some concerns:
|
||||
- we aren't keeping many of the user's args, so they
|
||||
can't readily set LOGLEVEL and such...
|
||||
- not sure how this affects multiple outputs
|
||||
*/
|
||||
lib.extendDerivation true passthru (stdenv.mkDerivation {
|
||||
src = unresholved;
|
||||
version = unresholved.version;
|
||||
pname = "resholved-${unresholved.pname}";
|
||||
buildInputs = [ resholve ];
|
||||
|
||||
# retain a reference to the base
|
||||
passthru = unresholved.passthru // {
|
||||
unresholved = unresholved;
|
||||
};
|
||||
|
||||
# do these imply that we should use NoCC or something?
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
cp -R $src $out
|
||||
'';
|
||||
|
||||
# enable below for verbose debug info if needed
|
||||
# supports default python.logging levels
|
||||
# LOGLEVEL="INFO";
|
||||
preFixup = phraseSolutions solutions unresholved;
|
||||
});
|
||||
}
|
||||
61
pkgs/development/misc/resholve/resholve.nix
Normal file
61
pkgs/development/misc/resholve/resholve.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, callPackage
|
||||
, python27Packages
|
||||
, installShellFiles
|
||||
, rSrc
|
||||
, version
|
||||
, oildev
|
||||
, binlore
|
||||
, resholve-utils
|
||||
}:
|
||||
|
||||
python27Packages.buildPythonApplication {
|
||||
pname = "resholve";
|
||||
inherit version;
|
||||
src = rSrc;
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
oildev
|
||||
/*
|
||||
Disable configargparse's tests on aarch64-darwin.
|
||||
Several of py27 scandir's tests fail on aarch64-darwin. Chain:
|
||||
configargparse -> pytest-check-hook -> pytest -> pathlib2 -> scandir
|
||||
TODO: drop if https://github.com/NixOS/nixpkgs/issues/156807 resolves?
|
||||
*/
|
||||
(python27Packages.configargparse.overridePythonAttrs (old: {
|
||||
doCheck = stdenv.hostPlatform.system != "aarch64-darwin";
|
||||
}))
|
||||
];
|
||||
|
||||
patchPhase = ''
|
||||
for file in setup.cfg _resholve/version.py; do
|
||||
substituteInPlace $file --subst-var-by version ${version}
|
||||
done
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
installManPage resholve.1
|
||||
'';
|
||||
|
||||
# Do not propagate Python; may be obsoleted by nixos/nixpkgs#102613
|
||||
# for context on why, see abathur/resholve#20
|
||||
postFixup = ''
|
||||
rm $out/nix-support/propagated-build-inputs
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
inherit (resholve-utils) mkDerivation phraseSolution writeScript writeScriptBin;
|
||||
tests = callPackage ./test.nix { inherit rSrc binlore; };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Resolve external shell-script dependencies";
|
||||
homepage = "https://github.com/abathur/resholve";
|
||||
license = with licenses; [ mit ];
|
||||
maintainers = with maintainers; [ abathur ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
19
pkgs/development/misc/resholve/source.nix
Normal file
19
pkgs/development/misc/resholve/source.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ fetchFromGitHub
|
||||
, ...
|
||||
}:
|
||||
|
||||
rec {
|
||||
version = "0.8.0";
|
||||
rSrc =
|
||||
# local build -> `make ci`; `make clean` to restore
|
||||
# return to remote source
|
||||
# if builtins.pathExists ./.local
|
||||
# then ./.
|
||||
# else
|
||||
fetchFromGitHub {
|
||||
owner = "abathur";
|
||||
repo = "resholve";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-oWS4ZBPjgH2UvYmvHVVRcyl15r3VS964BmB89y9DGo8=";
|
||||
};
|
||||
}
|
||||
182
pkgs/development/misc/resholve/test.nix
Normal file
182
pkgs/development/misc/resholve/test.nix
Normal file
|
|
@ -0,0 +1,182 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, callPackage
|
||||
, resholve
|
||||
, shunit2
|
||||
, fetchFromGitHub
|
||||
, coreutils
|
||||
, gnused
|
||||
, gnugrep
|
||||
, findutils
|
||||
, jq
|
||||
, bash
|
||||
, bats
|
||||
, libressl
|
||||
, openssl
|
||||
, python27
|
||||
, file
|
||||
, gettext
|
||||
, rSrc
|
||||
, runDemo ? false
|
||||
, binlore
|
||||
, sqlite
|
||||
, util-linux
|
||||
, gawk
|
||||
, rlwrap
|
||||
, gnutar
|
||||
, bc
|
||||
}:
|
||||
|
||||
let
|
||||
default_packages = [ bash file findutils gettext ];
|
||||
parsed_packages = [ coreutils sqlite util-linux gnused gawk findutils rlwrap gnutar bc ];
|
||||
in
|
||||
rec {
|
||||
module1 = resholve.mkDerivation {
|
||||
pname = "testmod1";
|
||||
version = "unreleased";
|
||||
|
||||
src = rSrc;
|
||||
setSourceRoot = "sourceRoot=$(echo */tests/nix/libressl)";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/{bin,submodule}
|
||||
install libressl.sh $out/bin/libressl.sh
|
||||
install submodule/helper.sh $out/submodule/helper.sh
|
||||
'';
|
||||
|
||||
solutions = {
|
||||
libressl = {
|
||||
# submodule to demonstrate
|
||||
scripts = [ "bin/libressl.sh" "submodule/helper.sh" ];
|
||||
interpreter = "none";
|
||||
inputs = [ jq module2 libressl.bin ];
|
||||
};
|
||||
};
|
||||
|
||||
is_it_okay_with_arbitrary_envs = "shonuff";
|
||||
};
|
||||
module2 = resholve.mkDerivation {
|
||||
pname = "testmod2";
|
||||
version = "unreleased";
|
||||
|
||||
src = rSrc;
|
||||
setSourceRoot = "sourceRoot=$(echo */tests/nix/openssl)";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/libexec
|
||||
install openssl.sh $out/bin/openssl.sh
|
||||
install libexec.sh $out/libexec/invokeme
|
||||
install profile $out/profile
|
||||
'';
|
||||
# LOGLEVEL="DEBUG";
|
||||
solutions = {
|
||||
openssl = {
|
||||
fix = {
|
||||
aliases = true;
|
||||
};
|
||||
scripts = [ "bin/openssl.sh" "libexec/invokeme" ];
|
||||
interpreter = "none";
|
||||
inputs = [ shunit2 openssl.bin "libexec" "libexec/invokeme" ];
|
||||
execer = [
|
||||
/*
|
||||
This is the same verdict binlore will
|
||||
come up with. It's a no-op just to demo
|
||||
how to fiddle lore via the Nix API.
|
||||
*/
|
||||
"cannot:${openssl.bin}/bin/openssl"
|
||||
# different verdict, but not used
|
||||
"can:${openssl.bin}/bin/c_rehash"
|
||||
];
|
||||
};
|
||||
profile = {
|
||||
scripts = [ "profile" ];
|
||||
interpreter = "none";
|
||||
inputs = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
# demonstrate that we could use resholve in larger build
|
||||
module3 = stdenv.mkDerivation {
|
||||
pname = "testmod3";
|
||||
version = "unreleased";
|
||||
|
||||
src = rSrc;
|
||||
setSourceRoot = "sourceRoot=$(echo */tests/nix/future_perfect_tense)";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
install conjure.sh $out/bin/conjure.sh
|
||||
${resholve.phraseSolution "conjure" {
|
||||
scripts = [ "bin/conjure.sh" ];
|
||||
interpreter = "${bash}/bin/bash";
|
||||
inputs = [ module1 ];
|
||||
fake = {
|
||||
external = [ "jq" "openssl" ];
|
||||
};
|
||||
}}
|
||||
'';
|
||||
};
|
||||
|
||||
cli = stdenv.mkDerivation {
|
||||
name = "resholve-test";
|
||||
src = rSrc;
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
cp *.ansi $out/
|
||||
'';
|
||||
doCheck = true;
|
||||
buildInputs = [ resholve ];
|
||||
checkInputs = [ coreutils bats python27 ];
|
||||
# LOGLEVEL="DEBUG";
|
||||
|
||||
# default path
|
||||
RESHOLVE_PATH = "${lib.makeBinPath default_packages}";
|
||||
# but separate packages for combining as needed
|
||||
PKG_FILE = "${lib.makeBinPath [ file ]}";
|
||||
PKG_FINDUTILS = "${lib.makeBinPath [ findutils ]}";
|
||||
PKG_GETTEXT = "${lib.makeBinPath [ gettext ]}";
|
||||
PKG_COREUTILS = "${lib.makeBinPath [ coreutils ]}";
|
||||
RESHOLVE_LORE = "${binlore.collect { drvs = default_packages ++ [ coreutils ] ++ parsed_packages; } }";
|
||||
PKG_PARSED = "${lib.makeBinPath parsed_packages}";
|
||||
|
||||
# explicit interpreter for demo suite; maybe some better way...
|
||||
INTERP = "${bash}/bin/bash";
|
||||
|
||||
checkPhase = ''
|
||||
patchShebangs .
|
||||
mkdir empty_lore
|
||||
touch empty_lore/{execers,wrappers}
|
||||
export EMPTY_LORE=$PWD/empty_lore
|
||||
printf "\033[33m============================= resholve test suite ===================================\033[0m\n" > test.ansi
|
||||
if ./test.sh &>> test.ansi; then
|
||||
cat test.ansi
|
||||
else
|
||||
cat test.ansi && exit 1
|
||||
fi
|
||||
'' + lib.optionalString runDemo ''
|
||||
printf "\033[33m============================= resholve demo ===================================\033[0m\n" > demo.ansi
|
||||
if ./demo &>> demo.ansi; then
|
||||
cat demo.ansi
|
||||
else
|
||||
cat demo.ansi && exit 1
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# Caution: ci.nix asserts the equality of both of these w/ diff
|
||||
resholvedScript = resholve.writeScript "resholved-script" {
|
||||
inputs = [ file ];
|
||||
interpreter = "${bash}/bin/bash";
|
||||
} ''
|
||||
echo "Hello"
|
||||
file .
|
||||
'';
|
||||
resholvedScriptBin = resholve.writeScriptBin "resholved-script-bin" {
|
||||
inputs = [ file ];
|
||||
interpreter = "${bash}/bin/bash";
|
||||
} ''
|
||||
echo "Hello"
|
||||
file .
|
||||
'';
|
||||
}
|
||||
34
pkgs/development/misc/rpiboot/default.nix
Normal file
34
pkgs/development/misc/rpiboot/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ lib, stdenv, fetchFromGitHub, libusb1 }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "rpiboot";
|
||||
version = "2021.07.01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "usbboot";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-BkNyYCrasfiRs7CbJa7tCo2k70TLGcXkOX+zGPyZGGE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ libusb1 ];
|
||||
|
||||
patchPhase = ''
|
||||
sed -i "s@/usr/@$out/@g" main.c
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
mkdir -p $out/share/rpiboot
|
||||
cp rpiboot $out/bin
|
||||
cp -r msd $out/share/rpiboot
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/raspberrypi/usbboot";
|
||||
description = "Utility to boot a Raspberry Pi CM/CM3/CM4/Zero over USB";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ cartr ];
|
||||
platforms = [ "aarch64-linux" "aarch64-darwin" "armv7l-linux" "armv6l-linux" "x86_64-linux" "x86_64-darwin" ];
|
||||
};
|
||||
}
|
||||
37
pkgs/development/misc/umr/default.nix
Normal file
37
pkgs/development/misc/umr/default.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchgit, bash-completion, cmake, pkg-config
|
||||
, libdrm, libpciaccess, llvmPackages, ncurses
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "umr";
|
||||
version = "unstable-2021-02-18";
|
||||
|
||||
src = fetchgit {
|
||||
url = "https://gitlab.freedesktop.org/tomstdenis/umr";
|
||||
rev = "79e17f8f2807ed707fc1be369d0aad536f6dbc97";
|
||||
sha256 = "IwTkHEuJ82hngPjFVIihU2rSolLBqHxQTNsP8puYPaY=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config llvmPackages.llvm.dev ];
|
||||
|
||||
buildInputs = [
|
||||
bash-completion
|
||||
libdrm
|
||||
libpciaccess
|
||||
llvmPackages.llvm
|
||||
ncurses
|
||||
];
|
||||
|
||||
# Remove static libraries (there are no dynamic libraries in there)
|
||||
postInstall = ''
|
||||
rm -r $out/lib
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "A userspace debugging and diagnostic tool for AMD GPUs";
|
||||
homepage = "https://gitlab.freedesktop.org/tomstdenis/umr";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ Flakebi ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
28
pkgs/development/misc/vc4/newlib.nix
Normal file
28
pkgs/development/misc/vc4/newlib.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ stdenv, texinfo, flex, bison, fetchFromGitHub, crossLibcStdenv, buildPackages }:
|
||||
|
||||
crossLibcStdenv.mkDerivation {
|
||||
name = "newlib";
|
||||
src = fetchFromGitHub {
|
||||
owner = "itszor";
|
||||
repo = "newlib-vc4";
|
||||
rev = "89abe4a5263d216e923fbbc80495743ff269a510";
|
||||
sha256 = "131r4v0nn68flnqibjcvhsrys3hs89bn0i4vwmrzgjd7v1rbgqav";
|
||||
};
|
||||
dontUpdateAutotoolsGnuConfigScripts = true;
|
||||
configurePlatforms = [ "target" ];
|
||||
enableParallelBuilding = true;
|
||||
|
||||
nativeBuildInputs = [ texinfo flex bison ];
|
||||
depsBuildBuild = [ buildPackages.stdenv.cc ];
|
||||
# newlib expects CC to build for build platform, not host platform
|
||||
preConfigure = ''
|
||||
export CC=cc
|
||||
'';
|
||||
|
||||
dontStrip = true;
|
||||
|
||||
passthru = {
|
||||
incdir = "/${stdenv.targetPlatform.config}/include";
|
||||
libdir = "/${stdenv.targetPlatform.config}/lib";
|
||||
};
|
||||
}
|
||||
62
pkgs/development/misc/yelp-tools/default.nix
Normal file
62
pkgs/development/misc/yelp-tools/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, libxml2
|
||||
, libxslt
|
||||
, itstool
|
||||
, gnome
|
||||
, pkg-config
|
||||
, meson
|
||||
, ninja
|
||||
, python3
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "yelp-tools";
|
||||
version = "42.0";
|
||||
|
||||
format = "other";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://gnome/sources/yelp-tools/${lib.versions.major version}/${pname}-${version}.tar.xz";
|
||||
sha256 = "LNQwY/+nJi3xXdjTeao+o5mdQmYfB1Y/SALaoRSfffQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
meson
|
||||
ninja
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
libxml2 # xmllint required by yelp-check.
|
||||
libxslt # xsltproc required by yelp-build and yelp-check.
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
itstool # build script checks for its presence but I am not sure if anything uses it
|
||||
gnome.yelp-xsl
|
||||
];
|
||||
|
||||
pythonPath = [
|
||||
python3.pkgs.lxml
|
||||
];
|
||||
|
||||
strictDeps = false; # TODO: Meson cannot find xmllint oherwise. Maybe add it to machine file?
|
||||
|
||||
doCheck = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = gnome.updateScript {
|
||||
packageName = pname;
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://wiki.gnome.org/Apps/Yelp/Tools";
|
||||
description = "Small programs that help you create, edit, manage, and publish your Mallard or DocBook documentation";
|
||||
maintainers = teams.gnome.members ++ (with maintainers; [ domenkozar ]);
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue