-
-
Save ncfavier/c1a16d3fa717ee5420525f90bba48239 to your computer and use it in GitHub Desktop.
pbot shit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: let | |
perlPkgs = with pkgs; with perlPackages; rec { | |
TextLevenshtein = buildPerlPackage { | |
pname = "Text-Levenshtein"; | |
version = "0.13"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/N/NE/NEILB/Text-Levenshtein-0.13.tar.gz"; | |
sha256 = "3a7cbf0bb79fca33d92618f6d8c2ae4b5e2ee5b43729142a9b8ad9d8a678d11f"; | |
}; | |
meta = { | |
homepage = https://github.com/neilbowers/Text-Levenshtein; | |
description = "Calculate the Levenshtein edit distance between two strings"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
reengineRE2 = buildPerlPackage { | |
pname = "re-engine-RE2"; | |
version = "0.13"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/D/DG/DGL/re-engine-RE2-0.13.tar.gz"; | |
sha256 = "c24aec69102c01bd3fcd0baef7e112e0675a5c3977821acc2d2daeee415a919a"; | |
}; | |
buildInputs = [ ExtUtilsCppGuess ]; | |
doCheck = false; | |
meta = { | |
description = "RE2 regex engine"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
NetDNSParanoid = buildPerlModule { | |
pname = "Net-DNS-Paranoid"; | |
version = "0.08"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/T/TO/TOKUHIROM/Net-DNS-Paranoid-0.08.tar.gz"; | |
sha256 = "db359ba7c490405456db465e4d7ecb9622326d9b00e59a7914dbbb2bd554784a"; | |
}; | |
propagatedBuildInputs = [ ClassAccessorLite NetDNS ]; | |
doCheck = false; | |
meta = { | |
homepage = https://github.com/tokuhirom/Net-DNS-Paranoid; | |
description = "Paranoid dns resolver"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
LWPxParanoidHandler = buildPerlModule { | |
pname = "LWPx-ParanoidHandler"; | |
version = "0.07"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/T/TO/TOKUHIROM/LWPx-ParanoidHandler-0.07.tar.gz"; | |
sha256 = "f18315bc3a64c2bf1db6f6ef7cc8d9a8b52c0b865b8a6af4240e16b6a3054b4a"; | |
}; | |
buildInputs = [ TestRequires ]; | |
propagatedBuildInputs = [ LWP NetDNSParanoid ]; | |
doCheck = false; | |
meta = { | |
homepage = https://github.com/tokuhirom/LWPx-ParanoidHandler; | |
description = "Handler for LWP::UserAgent that protects you from harm"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
LWPUserAgentParanoid = buildPerlPackage { | |
pname = "LWP-UserAgent-Paranoid"; | |
version = "0.97"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/T/TS/TSIBLEY/LWP-UserAgent-Paranoid-0.97.tar.gz"; | |
sha256 = "d1c6915497c51ba01505158fe99f6ec32a564a2c190453a3034e7a061a3a90a0"; | |
}; | |
buildInputs = [ Plack TestRequires TestTCP ]; | |
propagatedBuildInputs = [ LWP LWPxParanoidHandler NetDNSParanoid ]; | |
meta = { | |
description = "A modern LWPx::ParanoidAgent for safer requests"; | |
}; | |
}; | |
DateTimeFormatDuration = buildPerlPackage { | |
pname = "DateTime-Format-Duration"; | |
version = "1.04"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/E/ET/ETHER/DateTime-Format-Duration-1.04.tar.gz"; | |
sha256 = "c86b8095de3fe36dc53edda8b146318420a4425572863f8704e8529fc8ff6492"; | |
}; | |
propagatedBuildInputs = [ DateTime ParamsValidate ]; | |
meta = { | |
homepage = https://github.com/karenetheridge/DateTime-Format-Duration; | |
description = "Format and parse DateTime::Durations"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
AppConfigStd = buildPerlPackage { | |
pname = "AppConfig-Std"; | |
version = "1.10"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/N/NE/NEILB/AppConfig-Std-1.10.tar.gz"; | |
sha256 = "2b887c1264565bff92fe7cae5046b987fe0f8cb1dd317b9e0ba18e5f2240a06a"; | |
}; | |
propagatedBuildInputs = [ AppConfig ]; | |
meta = { | |
homepage = https://github.com/neilb/AppConfig-Std; | |
description = "Subclass of AppConfig that provides standard options"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
GamesDice = buildPerlPackage { | |
pname = "Games-Dice"; | |
version = "0.045"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/R/RJ/RJBS/Games-Dice-0.045.tar.gz"; | |
sha256 = "ece0f9f7a0fdb1e72faae5cd05823cac588a3476b92646b067ba2a77b261f54c"; | |
}; | |
meta = { | |
homepage = https://github.com/rjbs/Games-Dice; | |
description = "Perl module to simulate die rolls"; | |
license = lib.licenses.mit; | |
}; | |
}; | |
IPCShareable = buildPerlPackage { | |
pname = "IPC-Shareable"; | |
version = "0.61"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/M/MS/MSOUTH/IPC-Shareable-0.61.tar.gz"; | |
sha256 = "c2ffa5bbda076acd9fc1b7d9dab1ce6707f345c5a833431b5a8ee0f8744720c4"; | |
}; | |
meta = { | |
}; | |
}; | |
LinguaENABC = buildPerlPackage { | |
pname = "Lingua-EN-ABC"; | |
version = "0.10"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/B/BK/BKB/Lingua-EN-ABC-0.10.tar.gz"; | |
sha256 = "cdef0381b08107cfe56971a38d9dadde127f5f7fb9bcce2ab4360f957a7e7464"; | |
}; | |
propagatedBuildInputs = [ ConvertMoji JSONParse ]; | |
meta = { | |
description = "American, British, and Canadian English"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
ConvertMoji = buildPerlPackage { | |
pname = "Convert-Moji"; | |
version = "0.10"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/B/BK/BKB/Convert-Moji-0.10.tar.gz"; | |
sha256 = "4923fb681ccf3856087e4a671a1e3cfd1a920ae936c9442081c2d9060da156cb"; | |
}; | |
meta = { | |
description = "Objects to convert alphabets"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
LinguaENFractions = buildPerlPackage { | |
pname = "Lingua-EN-Fractions"; | |
version = "0.09"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/N/NE/NEILB/Lingua-EN-Fractions-0.09.tar.gz"; | |
sha256 = "0761083607ece8673f9c846006da70e24a4646edc190e3299a39bc9d2ca48aaf"; | |
}; | |
propagatedBuildInputs = [ LinguaENNumbers ]; | |
meta = { | |
homepage = https://github.com/neilb/Lingua-EN-Fractions; | |
description = "Convert "3/4" into "three quarters", etc"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
LinguaENNumbers = buildPerlPackage { | |
pname = "Lingua-EN-Numbers"; | |
version = "2.03"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/N/NE/NEILB/Lingua-EN-Numbers-2.03.tar.gz"; | |
sha256 = "493b909a98798668004a2ae486510dd603f858efbab8c50d931627ee8c40a5ac"; | |
}; | |
meta = { | |
license = lib.licenses.free; | |
}; | |
}; | |
LinguaENNumbersYears = buildPerlPackage { | |
pname = "Lingua-EN-Numbers-Years"; | |
version = "1.05"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/N/NE/NEILB/Lingua-EN-Numbers-Years-1.05.tar.gz"; | |
sha256 = "e59ddf329aa685606a7bfdf799463e39528dc917e83e01b1a9af30d4a1f0d3fc"; | |
}; | |
propagatedBuildInputs = [ LinguaENNumbers ]; | |
meta = { | |
homepage = https://github.com/neilb/Lingua-EN-Numbers-Years; | |
description = "Turn "1984" into "nineteen eighty-four", etc"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
LWPUserAgentWithCache = buildPerlPackage { | |
pname = "LWP-UserAgent-WithCache"; | |
version = "0.13"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/S/SE/SEKIMURA/LWP-UserAgent-WithCache-0.13.tar.gz"; | |
sha256 = "bb5993da4d3e817c1d67928446c2f9ec7cd234afa24cb90556f8d899279ed175"; | |
}; | |
propagatedBuildInputs = [ CacheCache FileHomeDir LWP ]; | |
doCheck = false; | |
meta = { | |
}; | |
}; | |
MathExpressionEvaluator = buildPerlPackage { | |
pname = "Math-Expression-Evaluator"; | |
version = "0.3.2"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/M/MO/MORITZ/Math-Expression-Evaluator-v0.3.2.tar.gz"; | |
sha256 = "21b03869abd963be14c1acd1df824a22ba3a1f8e2a3fd8bd6fe1e6997472886a"; | |
}; | |
meta = { | |
description = "Parses, compiles and evaluates mathematic expressions"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
MathUnits = buildPerlPackage { | |
pname = "Math-Units"; | |
version = "1.3"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/D/DM/DMUEY/Math-Units-1.3.tar.gz"; | |
sha256 = "704202de3d4a6849cb781206cd3e156d85a2c2a93dd774ab6ab541c821a413ec"; | |
}; | |
meta = { | |
}; | |
}; | |
NetDict = buildPerlPackage { | |
pname = "Net-Dict"; | |
version = "2.21"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/N/NE/NEILB/Net-Dict-2.21.tar.gz"; | |
sha256 = "4e071d1b82158b35f24e557af81f505a913c6dfe4d04fe5201236afe74be1f3b"; | |
}; | |
buildInputs = [ TestDifferences TestRequiresInternet ]; | |
propagatedBuildInputs = [ AppConfigStd ]; | |
meta = { | |
description = "Client API for accessing dictionary servers (RFC 2229)"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
StringLCSS = buildPerlPackage { | |
pname = "String-LCSS"; | |
version = "1.00"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/G/GS/GSULLIVAN/String-LCSS-1.00.tar.gz"; | |
sha256 = "85bd36fa76999db75bccb6942d34eef7cdf979d6b1526272029f681f8518238d"; | |
}; | |
meta = { | |
description = "Find The Longest Common Substring of Two Strings"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
TextParseWords = buildPerlPackage { | |
pname = "Text-ParseWords"; | |
version = "3.30"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/C/CH/CHORNY/Text-ParseWords-3.30.tar.gz"; | |
sha256 = "85e0238179dd43997e58c66bd51611182bc7d533505029a2db0d3232edaff5e8"; | |
}; | |
meta = { | |
description = "Parse text into an array of tokens or array of arrays"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
TextWordDiff = buildPerlPackage { | |
pname = "Text-WordDiff"; | |
version = "0.09"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/T/TI/TIMK/Text-WordDiff-0.09.tar.gz"; | |
sha256 = "fee699ca763adca2f4e18f4a8a836fd2102bc2820af708f8eb43356d5ae0d50e"; | |
}; | |
propagatedBuildInputs = [ AlgorithmDiff HTMLParser ]; | |
meta = { | |
homepage = https://metacpan.org/release/Text-WordDiff; | |
description = "Track changes between documents"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
WebServiceUrbanDictionary = buildPerlPackage { | |
pname = "WebService-UrbanDictionary"; | |
version = "2.015"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/W/WO/WOODRUFFW/WebService-UrbanDictionary-2.015.tar.gz"; | |
sha256 = "196befcd2e6fc10b4bf91d1c369dc7eb906e26a21f2f2bcee1da1fe384bb1b9b"; | |
}; | |
buildInputs = [ TestRequiresInternet ]; | |
propagatedBuildInputs = [ JSON LWP Moo ]; | |
meta = { | |
homepage = http://metacpan.org/release/WebService-UrbanDictionary; | |
description = "An OO interface to UrbanDictionary.com's JSON API"; | |
license = lib.licenses.mit; | |
}; | |
}; | |
WWWGoogleCustomSearch = buildPerlPackage { | |
pname = "WWW-Google-CustomSearch"; | |
version = "0.39"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/M/MA/MANWAR/WWW-Google-CustomSearch-0.39.tar.gz"; | |
sha256 = "ee2523f900123be03094b0aa9162af2f3ea35e2b3b253c92f7c12f5bbeca29fe"; | |
}; | |
propagatedBuildInputs = [ JSON Moo TypeTiny URI WWWGoogleUserAgent namespaceautoclean ]; | |
meta = { | |
description = "Interface to Google JSON/Atom Custom Search"; | |
license = lib.licenses.artistic2; | |
}; | |
}; | |
WWWGoogleUserAgent = buildPerlPackage { | |
pname = "WWW-Google-UserAgent"; | |
version = "0.23"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/M/MA/MANWAR/WWW-Google-UserAgent-0.23.tar.gz"; | |
sha256 = "a0f2a17541028df36015a7f995aa3e23ce54ddf2647eaa0806b0c48feb3bc6c5"; | |
}; | |
propagatedBuildInputs = [ IOSocketSSL Moo NetSSLeay Throwable TypeTiny namespaceautoclean ]; | |
meta = { | |
description = "Low-level HTTP request handler for Google API"; | |
license = lib.licenses.artistic2; | |
}; | |
}; | |
WWWWikipedia = buildPerlPackage { | |
pname = "WWW-Wikipedia"; | |
version = "2.05"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/B/BR/BRICAS/WWW-Wikipedia-2.05.tar.gz"; | |
sha256 = "6e881a7b5f373c432f7ba4ca0acae583e48bafa665a1f91fb1a69cdb0d1590e6"; | |
}; | |
propagatedBuildInputs = [ LWP LWPProtocolhttps TextAutoformat URI ]; | |
doCheck = false; | |
meta = { | |
description = "Automated interface to the Wikipedia"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
utf8all = buildPerlPackage { | |
pname = "utf8-all"; | |
version = "0.024"; | |
src = fetchurl { | |
url = "mirror://cpan/authors/id/H/HA/HAYOBAAN/utf8-all-0.024.tar.gz"; | |
sha256 = "9233465d41174077ccdbc04f751ab7d68c8d19114e36cd02f2c5fdc2bc3937b7"; | |
}; | |
buildInputs = [ TestException TestFatal TestWarn ]; | |
propagatedBuildInputs = [ ImportInto PerlIOutf8_strict ]; | |
meta = { | |
homepage = http://metacpan.org/release/utf8-all/; | |
description = "Turn on Unicode - all of it"; | |
license = with lib.licenses; [ artistic1 gpl1Plus ]; | |
}; | |
}; | |
}; | |
in with perlPkgs; pkgs.mkShell { | |
nativeBuildInputs = with pkgs; [ | |
perl | |
rlwrap | |
qemu | |
] ++ (with perlPackages; [ | |
AppConfigStd | |
CGI | |
DataDumper | |
DateTime | |
DateTimeFormatDuration | |
DateTimeFormatFlexible | |
DBDSQLite | |
DBI | |
DevelStackTrace | |
GamesDice | |
GetoptLong | |
HTMLFormatter | |
HTMLParser | |
HTMLTree | |
IPCRun | |
IPCShareable | |
JSON | |
JSONXS | |
LinguaENABC | |
LinguaENFractions | |
LinguaENNumbers | |
LinguaENNumbersYears | |
LinguaStem | |
LWP | |
LWPProtocolhttps | |
LWPUserAgentParanoid | |
LWPUserAgentWithCache | |
MathExpressionEvaluator | |
MathUnits | |
ModuleRefresh | |
NetDict | |
ParseRecDescent | |
ProcProcessTable | |
reengineRE2 | |
Storable | |
StringLCSS | |
TextAutoformat | |
TextBalanced | |
TextCSV | |
TextLevenshtein | |
TextParseWords | |
TextUnidecode | |
TextWordDiff | |
TimeDuration | |
TimeParseDate | |
URI | |
utf8all | |
WebServiceUrbanDictionary | |
WWWGoogleCustomSearch | |
WWWWikipedia | |
XMLLibXML | |
XMLParser | |
XMLRSS | |
]); | |
shellHook = '' | |
PATH+=:${toString ./.} | |
''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: let | |
inherit (pkgs) lib; | |
perlPkgs = p: with p; [ | |
DataDumper | |
Encode | |
GetoptLong | |
IO | |
IPCRun | |
JSON | |
LWP | |
TextBalanced | |
TimeHiRes | |
]; | |
haskellPkgs = p: with p; [ | |
array | |
comonad | |
containers | |
kan-extensions | |
lens | |
megaparsec | |
mtl | |
profunctors | |
random | |
]; | |
in import <nixpkgs/nixos/lib/make-disk-image.nix> { | |
inherit pkgs lib; | |
format = "qcow2"; | |
config = (pkgs.nixos ({ pkgs, lib, ... }: with pkgs; { | |
networking.hostName = "pbot"; | |
boot = { | |
loader.grub.device = "/dev/vda"; | |
loader.timeout = 0; | |
kernelPackages = linuxPackages_latest; | |
}; | |
fileSystems."/".device = "/dev/disk/by-label/nixos"; | |
console.keyMap = "fr-pc"; | |
users.users = { | |
root.password = ""; | |
compiler = { | |
isNormalUser = true; | |
group = "compiler"; | |
password = ""; | |
}; | |
}; | |
users.groups.compiler = {}; | |
services.getty.autologinUser = "root"; | |
environment = { | |
systemPackages = [ | |
vim | |
perl | |
(haskellPackages.ghcWithPackages haskellPkgs) | |
]; | |
variables.PERL5LIB = perlPackages.makeFullPerlPath (perlPkgs perlPackages); | |
shellAliases.compiler-server = "perl /root/compiler_vm/compiler_vm_server.pl"; | |
}; | |
})).config; | |
contents = [ | |
{ | |
source = "/home/n/pbot/modules/compiler_vm"; | |
target = "/root"; | |
} | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment