Merge remote-tracking branch 'official/master' into ppp_2.4.7_squash
Conflicts: pkgs/tools/networking/ppp/default.nix
This commit is contained in:
commit
3baf1c0772
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -14,4 +14,5 @@ result-*
|
|||
|
||||
/pkgs/applications/kde-apps-*/tmp/
|
||||
/pkgs/development/libraries/kde-frameworks-*/tmp/
|
||||
/pkgs/development/libraries/qt-5/*-submodules/tmp/
|
||||
/pkgs/desktops/plasma-*/tmp/
|
|
@ -1,6 +1,8 @@
|
|||
Nixpkgs is a collection of packages for [Nix](https://nixos.org/nix/) package
|
||||
manager.
|
||||
|
||||
[![Build Status](https://travis-ci.org/NixOS/nixpkgs.svg?branch=master)](https://travis-ci.org/NixOS/nixpkgs) [![Issue Stats](http://www.issuestats.com/github/nixos/nixpkgs/badge/pr)](http://www.issuestats.com/github/nixos/nixpkgs) [![Issue Stats](http://www.issuestats.com/github/nixos/nixpkgs/badge/issue)](http://www.issuestats.com/github/nixos/nixpkgs)
|
||||
|
||||
[NixOS](https://nixos.org/nixos/) linux distribution source code is located inside `nixos/` folder.
|
||||
|
||||
* [NixOS installation instructions](https://nixos.org/nixos/manual/#ch-installation)
|
||||
|
|
|
@ -624,6 +624,85 @@ sed -i '/ = data_files/d' setup.py</programlisting>
|
|||
|
||||
|
||||
<section xml:id="ssec-language-go"><title>Go</title>
|
||||
|
||||
<para>The function <varname>buildGoPackage</varname> builds
|
||||
standard Go packages.
|
||||
</para>
|
||||
|
||||
<example xml:id='ex-buildGoPackage'><title>buildGoPackage</title>
|
||||
<programlisting>
|
||||
net = buildGoPackage rec {
|
||||
name = "go.net-${rev}";
|
||||
goPackagePath = "code.google.com/p/go.net"; <co xml:id='ex-buildGoPackage-1' />
|
||||
subPackages = [ "ipv4" "ipv6" ]; <co xml:id='ex-buildGoPackage-2' />
|
||||
rev = "28ff664507e4";
|
||||
src = fetchhg {
|
||||
inherit rev;
|
||||
url = "https://${goPackagePath}";
|
||||
sha256 = "1lkz4c9pyz3yz2yz18hiycvlfhgy3jxp68bs7mv7bcfpaj729qav";
|
||||
};
|
||||
propagatedBuildInputs = [ goPackages.text ]; <co xml:id='ex-buildGoPackage-3' />
|
||||
};
|
||||
</programlisting>
|
||||
</example>
|
||||
|
||||
<para><xref linkend='ex-buildGoPackage'/> is an example expression using buildGoPackage,
|
||||
the following arguments are of special significance to the function:
|
||||
|
||||
<calloutlist>
|
||||
|
||||
<callout arearefs='ex-buildGoPackage-1'>
|
||||
<para>
|
||||
<varname>goPackagePath</varname> specifies the package's canonical Go import path.
|
||||
</para>
|
||||
</callout>
|
||||
|
||||
<callout arearefs='ex-buildGoPackage-2'>
|
||||
<para>
|
||||
<varname>subPackages</varname> limits the builder from building child packages that
|
||||
have not been listed. If <varname>subPackages</varname> is not specified, all child
|
||||
packages will be built.
|
||||
</para>
|
||||
<para>
|
||||
In this example only <literal>code.google.com/p/go.net/ipv4</literal> and
|
||||
<literal>code.google.com/p/go.net/ipv4</literal> will be built.
|
||||
</para>
|
||||
</callout>
|
||||
|
||||
<callout arearefs='ex-buildGoPackage-3'>
|
||||
<para>
|
||||
<varname>propagatedBuildInputs</varname> is where the dependencies of a Go library are
|
||||
listed. Only libraries should list <varname>propagatedBuildInputs</varname>. If a standalone
|
||||
program is being build instead, use <varname>buildInputs</varname>. If a library's tests require
|
||||
additional dependencies that are not propagated, they should be listed in <varname>buildInputs</varname>.
|
||||
</para>
|
||||
</callout>
|
||||
|
||||
</calloutlist>
|
||||
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Reusable Go libraries may be found in the <varname>goPackages</varname> set. You can test
|
||||
build a Go package as follows:
|
||||
|
||||
<screen>
|
||||
$ nix-build -A goPackages.net
|
||||
</screen>
|
||||
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You may use Go packages installed into the active Nix profiles by adding
|
||||
the following to your ~/.bashrc:
|
||||
|
||||
<screen>
|
||||
for p in $NIX_PROFILES; do
|
||||
GOPATH="$p/share/go:$GOPATH"
|
||||
done
|
||||
</screen>
|
||||
</para>
|
||||
|
||||
<para>To extract dependency information from a Go package in automated way use <link xlink:href="https://github.com/cstrahan/go2nix">go2nix</link>.</para>
|
||||
</section>
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
bbenoist = "Baptist BENOIST <return_0@live.com>";
|
||||
bdimcheff = "Brandon Dimcheff <brandon@dimcheff.com>";
|
||||
bennofs = "Benno Fünfstück <benno.fuenfstueck@gmail.com>";
|
||||
benley = "Benjamin Staffin <benley@gmail.com>";
|
||||
berdario = "Dario Bertini <berdario@gmail.com>";
|
||||
bergey = "Daniel Bergey <bergey@teallabs.org>";
|
||||
bjg = "Brian Gough <bjg@gnu.org>";
|
||||
|
|
|
@ -7,9 +7,11 @@
|
|||
<title>Release Notes</title>
|
||||
|
||||
<partintro>
|
||||
<para>This section lists the release notes for each stable version of NixOS.</para>
|
||||
<para>This section lists the release notes for each stable version of NixOS
|
||||
and current unstable revision.</para>
|
||||
</partintro>
|
||||
|
||||
<xi:include href="rl-unstable.xml" />
|
||||
<xi:include href="rl-1412.xml" />
|
||||
<xi:include href="rl-1404.xml" />
|
||||
<xi:include href="rl-1310.xml" />
|
||||
|
|
41
nixos/doc/manual/release-notes/rl-unstable.xml
Normal file
41
nixos/doc/manual/release-notes/rl-unstable.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="sec-release-unstable">
|
||||
|
||||
<title>Unstable revision</title>
|
||||
|
||||
<para>In addition to numerous new and upgraded packages, this release has the following highlights:
|
||||
|
||||
<!--<itemizedlist>
|
||||
|
||||
</itemizedlist>-->
|
||||
</para>
|
||||
|
||||
<para>Following new services were added since the last release:
|
||||
|
||||
<!--<itemizedlist>
|
||||
|
||||
</itemizedlist>-->
|
||||
</para>
|
||||
|
||||
<para>When upgrading from a previous release, please be aware of the
|
||||
following incompatible changes:
|
||||
|
||||
<itemizedlist>
|
||||
|
||||
<listitem><para>Steam now doesn't need root rights to work. Instead of using
|
||||
<literal>*-steam-chrootenv</literal>, you should now just run <literal>steam</literal>.
|
||||
<literal>steamChrootEnv</literal> package was renamed to <literal>steam</literal>,
|
||||
and old <literal>steam</literal> package -- to <literal>steamOriginal</literal>.
|
||||
</para></listitem>
|
||||
|
||||
<listitem><para>CMPlayer has been renamed to bomi upstream. Package <literal>cmplayer</literal>
|
||||
was accordingly renamed to <literal>bomi</literal>
|
||||
</para></listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</para>
|
||||
|
||||
</chapter>
|
|
@ -1,16 +0,0 @@
|
|||
This file should become a nix expression. (see modules/installer/tools/tools.nix)
|
||||
|
||||
you need to:
|
||||
- download the latest jQuery from and copy it to chrome/content:
|
||||
http://code.jquery.com/jquery-1.5.2.js
|
||||
|
||||
- install 'xulrunner' with nix:
|
||||
nix-env -Ai nixpkgs_sys.firefox40Pkgs.xulrunner
|
||||
|
||||
- make sure nixos-option in your path
|
||||
|
||||
- have /etc/nixos/nixpkgs
|
||||
- have /etc/nixos/nixos
|
||||
|
||||
run it:
|
||||
- xulrunner /etc/nixos/nixos/gui/application.ini -jsconsole
|
|
@ -1,36 +0,0 @@
|
|||
[App]
|
||||
;
|
||||
; This field specifies your organization's name. This field is recommended,
|
||||
; but optional.
|
||||
Vendor=NixOS
|
||||
;
|
||||
; This field specifies your application's name. This field is required.
|
||||
Name=NixOS-gui
|
||||
;
|
||||
; This field specifies your application's version. This field is optional.
|
||||
Version=0.1
|
||||
;
|
||||
; This field specifies your application's build ID (timestamp). This field is
|
||||
; required.
|
||||
BuildID=20110424
|
||||
;
|
||||
; This field specifies a compact copyright notice for your application. This
|
||||
; field is optional.
|
||||
;Copyright=
|
||||
|
||||
;
|
||||
; This ID is just an example. Every XUL app ought to have it's own unique ID.
|
||||
; You can use the microsoft "guidgen" or "uuidgen" tools, or go on
|
||||
; irc.mozilla.org and /msg botbot uuid. This field is optional.
|
||||
;ID=
|
||||
|
||||
[Gecko]
|
||||
;
|
||||
; This field is required. It specifies the minimum Gecko version that this
|
||||
; application requires.
|
||||
MinVersion=1.9a5
|
||||
;
|
||||
; This field is optional. It specifies the maximum Gecko version that this
|
||||
; application requires. It should be specified if your application uses
|
||||
; unfrozen interfaces.
|
||||
MaxVersion=2.*
|
|
@ -1 +0,0 @@
|
|||
manifest chrome/chrome.manifest
|
|
@ -1 +0,0 @@
|
|||
content nixos-gui content/
|
|
@ -1,137 +0,0 @@
|
|||
|
||||
function inspect(obj, maxLevels, level)
|
||||
{
|
||||
var str = '', type, msg;
|
||||
|
||||
// Start Input Validations
|
||||
// Don't touch, we start iterating at level zero
|
||||
if(level == null) level = 0;
|
||||
|
||||
// At least you want to show the first level
|
||||
if(maxLevels == null) maxLevels = 1;
|
||||
if(maxLevels < 1)
|
||||
return '<font color="red">Error: Levels number must be > 0</font>';
|
||||
|
||||
// We start with a non null object
|
||||
if(obj == null)
|
||||
return '<font color="red">Error: Object <b>NULL</b></font>';
|
||||
// End Input Validations
|
||||
|
||||
// Each Iteration must be indented
|
||||
str += '<ul>';
|
||||
|
||||
// Start iterations for all objects in obj
|
||||
for(property in obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Show "property" and "type property"
|
||||
type = typeof(obj[property]);
|
||||
str += '<li>(' + type + ') ' + property +
|
||||
( (obj[property]==null)?(': <b>null</b>'):('')) + '</li>';
|
||||
|
||||
// We keep iterating if this property is an Object, non null
|
||||
// and we are inside the required number of levels
|
||||
if((type == 'object') && (obj[property] != null) && (level+1 < maxLevels))
|
||||
str += inspect(obj[property], maxLevels, level+1);
|
||||
}
|
||||
catch(err)
|
||||
{
|
||||
// Is there some properties in obj we can't access? Print it red.
|
||||
if(typeof(err) == 'string') msg = err;
|
||||
else if(err.message) msg = err.message;
|
||||
else if(err.description) msg = err.description;
|
||||
else msg = 'Unknown';
|
||||
|
||||
str += '<li><font color="red">(Error) ' + property + ': ' + msg +'</font></li>';
|
||||
}
|
||||
}
|
||||
|
||||
// Close indent
|
||||
str += '</ul>';
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
// Run xulrunner application.ini -jsconsole -console, to see messages.
|
||||
function log(str)
|
||||
{
|
||||
Components.classes['@mozilla.org/consoleservice;1']
|
||||
.getService(Components.interfaces.nsIConsoleService)
|
||||
.logStringMessage(str);
|
||||
}
|
||||
|
||||
function makeTempFile(prefix)
|
||||
{
|
||||
var file = Components.classes["@mozilla.org/file/directory_service;1"]
|
||||
.getService(Components.interfaces.nsIProperties)
|
||||
.get("TmpD", Components.interfaces.nsIFile);
|
||||
file.append(prefix || "xulrunner");
|
||||
file.createUnique(Components.interfaces.nsIFile.NORMAL_FILE_TYPE, 0664);
|
||||
return file;
|
||||
}
|
||||
|
||||
function writeToFile(file, data)
|
||||
{
|
||||
// file is nsIFile, data is a string
|
||||
var foStream = Components.classes["@mozilla.org/network/file-output-stream;1"]
|
||||
.createInstance(Components.interfaces.nsIFileOutputStream);
|
||||
|
||||
// use 0x02 | 0x10 to open file for appending.
|
||||
foStream.init(file, 0x02 | 0x08 | 0x20, 0664, 0); // write, create, truncate
|
||||
foStream.write(data, data.length);
|
||||
foStream.close();
|
||||
}
|
||||
|
||||
function readFromFile(file)
|
||||
{
|
||||
// |file| is nsIFile
|
||||
var data = "";
|
||||
var fstream = Components.classes["@mozilla.org/network/file-input-stream;1"]
|
||||
.createInstance(Components.interfaces.nsIFileInputStream);
|
||||
var sstream = Components.classes["@mozilla.org/scriptableinputstream;1"]
|
||||
.createInstance(Components.interfaces.nsIScriptableInputStream);
|
||||
fstream.init(file, -1, 0, 0);
|
||||
sstream.init(fstream);
|
||||
|
||||
var str = sstream.read(4096);
|
||||
while (str.length > 0) {
|
||||
data += str;
|
||||
str = sstream.read(4096);
|
||||
}
|
||||
|
||||
sstream.close();
|
||||
fstream.close();
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function runProgram(commandLine)
|
||||
{
|
||||
// create an nsILocalFile for the executable
|
||||
var file = Components.classes["@mozilla.org/file/local;1"]
|
||||
.createInstance(Components.interfaces.nsILocalFile);
|
||||
file.initWithPath("/bin/sh");
|
||||
|
||||
// create an nsIProcess
|
||||
var process = Components.classes["@mozilla.org/process/util;1"]
|
||||
.createInstance(Components.interfaces.nsIProcess);
|
||||
process.init(file);
|
||||
|
||||
// Run the process.
|
||||
// If first param is true, calling thread will be blocked until
|
||||
// called process terminates.
|
||||
// Second and third params are used to pass command-line arguments
|
||||
// to the process.
|
||||
var args = ["-c", commandLine];
|
||||
process.run(true, args, args.length);
|
||||
}
|
||||
|
||||
// only for testing...
|
||||
function testIO()
|
||||
{
|
||||
var f = makeTempFile();
|
||||
writeToFile(f, "essai\ntest");
|
||||
alert(readFromFile(f));
|
||||
runProgram("zenity --info");
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
// global variables.
|
||||
var gNixOS;
|
||||
var gOptionView;
|
||||
|
||||
/*
|
||||
var gProgressBar;
|
||||
function setProgress(current, max)
|
||||
{
|
||||
if (gProgressBar) {
|
||||
gProgressBar.value = 100 * current / max;
|
||||
log("progress: " + gProgressBar.value + "%");
|
||||
}
|
||||
else
|
||||
log("unknow progress bar");
|
||||
}
|
||||
*/
|
||||
|
||||
function updateTextbox(id, value)
|
||||
{
|
||||
// setting the height cause an overflow which resize the textbox to its
|
||||
// content due to its onoverflow attribute.
|
||||
$(id).attr("value", value).attr("height", 1);
|
||||
};
|
||||
|
||||
function updatePanel(options)
|
||||
{
|
||||
log("updatePanel: " + options.length);
|
||||
if (options.length == 0)
|
||||
return;
|
||||
// FIXME: ignore the rest of the selection for now.
|
||||
var o = options[0];
|
||||
$("#name").attr("label", o.path);
|
||||
|
||||
if (o.typename != null)
|
||||
$("#typename").attr("label", o.typename);
|
||||
else
|
||||
$("#typename").attr("label", "");
|
||||
|
||||
$("#desc").text(o.description);
|
||||
|
||||
if (o.value != null)
|
||||
updateTextbox("#val", o.value);
|
||||
else
|
||||
updateTextbox("#val", "");
|
||||
|
||||
if (o.defaultValue != null)
|
||||
updateTextbox("#def", o.defaultValue);
|
||||
else
|
||||
updateTextbox("#def", "");
|
||||
|
||||
if (o.example != null)
|
||||
updateTextbox("#exp", o.example);
|
||||
else
|
||||
updateTextbox("#exp", "");
|
||||
|
||||
updateTextbox("#decls", o.declarations.join("\n"));
|
||||
updateTextbox("#defs", o.definitions.join("\n"));
|
||||
}
|
||||
|
||||
|
||||
function onload()
|
||||
{
|
||||
var optionTree = document.getElementById("option-tree");
|
||||
// gProgressBar = document.getElementById("progress-bar");
|
||||
// setProgress(0, 1);
|
||||
|
||||
gNixOS = new NixOS();
|
||||
gOptionView = new OptionView(gNixOS.option, updatePanel);
|
||||
optionTree.view = gOptionView;
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
|
||||
|
||||
<!DOCTYPE window>
|
||||
|
||||
<!-- To edit this file I recommend you to use:
|
||||
http://xulfr.org/outils/xulediteur.xul
|
||||
-->
|
||||
|
||||
<window
|
||||
id = "nixos-gui"
|
||||
title = "NixOS gui"
|
||||
width = "800"
|
||||
height = "600"
|
||||
xmlns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<script src="jquery-1.5.2.js"/>
|
||||
<script src="io.js"/>
|
||||
<script src="nixos.js"/>
|
||||
<script src="optionView.js"/>
|
||||
<script src="main.js"/>
|
||||
<hbox flex="1">
|
||||
<vbox width="250">
|
||||
<tree flex="1" id="option-tree" persist="height" onselect="gOptionView.selectionChanged()">
|
||||
<treecols>
|
||||
<treecol persist="hidden width" flex="9" id="opt-name"
|
||||
label="Option" primary="true"/>
|
||||
<!-- Uncomment the following column to see the number of option
|
||||
printed below each options. -->
|
||||
<!--
|
||||
<treecol persist="hidden width" flex="1" id="dbg-size"
|
||||
label="sz"/>
|
||||
-->
|
||||
</treecols>
|
||||
<treechildren id="first-child" flex="1"/>
|
||||
</tree>
|
||||
</vbox>
|
||||
<vbox flex="3" style="overflow: auto">
|
||||
<caption id="name" label=""/>
|
||||
<caption id="typename" label=""/>
|
||||
<separator/>
|
||||
<description id="desc" hidden="false"></description>
|
||||
<separator/>
|
||||
<caption label="Value:"/>
|
||||
<textbox id="val" readonly="true" multiline="true" value=""
|
||||
class="plain" hidden="false" onoverflow="this.height =
|
||||
this.inputField.scrollHeight;" />
|
||||
<separator/>
|
||||
<caption label="Default:"/>
|
||||
<textbox id="def" readonly="true" multiline="true" value="" class="plain" hidden="false" onoverflow="this.height = this.inputField.scrollHeight;" />
|
||||
<separator/>
|
||||
<caption label="Example:"/>
|
||||
<textbox id="exp" readonly="true" multiline="true" value="" class="plain" hidden="false" onoverflow="this.height = this.inputField.scrollHeight;" />
|
||||
<separator/>
|
||||
<caption label="Declarations:"/>
|
||||
<textbox id="decls" readonly="true" multiline="true" value="" class="plain" hidden="false" onoverflow="this.height = this.inputField.scrollHeight;" />
|
||||
<separator/>
|
||||
<caption label="Definitions:"/>
|
||||
<textbox id="defs" readonly="true" multiline="true" value=""
|
||||
class="plain" hidden="false" onoverflow="this.height = this.inputField.scrollHeight;" />
|
||||
</vbox>
|
||||
</hbox>
|
||||
<!-- <progressmeter id="progress-bar" value="0%"/> -->
|
||||
</window>
|
|
@ -1,255 +0,0 @@
|
|||
|
||||
function NixOS () {
|
||||
var env = Components.classes["@mozilla.org/process/environment;1"].
|
||||
getService(Components.interfaces.nsIEnvironment);
|
||||
|
||||
if (env.exists("NIXOS"))
|
||||
this.nixos = env.get("NIXOS");
|
||||
if (env.exists("NIXOS_CONFIG"))
|
||||
this.config = env.get("NIXOS_CONFIG");
|
||||
if (env.exists("NIXPKGS"))
|
||||
this.nixpkgs = env.get("NIXPKGS");
|
||||
if (env.exists("mountPoint"))
|
||||
this.root = env.get("mountPoint");
|
||||
if (env.exists("NIXOS_OPTION"))
|
||||
this.optionBin = env.get("NIXOS_OPTION");
|
||||
this.option = new Option("options", this, null);
|
||||
};
|
||||
|
||||
NixOS.prototype = {
|
||||
root: "",
|
||||
nixos: "/etc/nixos/nixos",
|
||||
nixpkgs: "/etc/nixos/nixpkgs",
|
||||
config: "/etc/nixos/configuration.nix",
|
||||
instantiateBin: "/run/current-system/sw/bin/nix-instantiate",
|
||||
optionBin: "/run/current-system/sw/bin/nixos-option",
|
||||
tmpFile: "nixos-gui",
|
||||
option: null
|
||||
};
|
||||
|
||||
function Option (name, context, parent) {
|
||||
this.name = name;
|
||||
this.context_ = context;
|
||||
if (parent == null)
|
||||
this.path = "";
|
||||
else if (parent.path == "")
|
||||
this.path = name;
|
||||
else
|
||||
this.path = parent.path + "." + name;
|
||||
};
|
||||
|
||||
Option.prototype = {
|
||||
load: function () {
|
||||
var env = "";
|
||||
env += "'NIXOS=" + this.context_.root + this.context_.nixos + "' ";
|
||||
env += "'NIXOS_PKGS=" + this.context_.root + this.context_.nixpkgs + "' ";
|
||||
env += "'NIXOS_CONFIG=" + this.context_.config + "' ";
|
||||
var out = makeTempFile(this.context_.tmpFile);
|
||||
var prog = this.context_.optionBin + " 2>&1 >" + out.path + " ";
|
||||
var args = " --xml " + this.path;
|
||||
|
||||
runProgram(/*env + */ prog + args);
|
||||
var xml = readFromFile(out);
|
||||
out.remove(false);
|
||||
|
||||
// jQuery does a stack overflow when converting a huge XML to a DOM.
|
||||
var dom = DOMParser().parseFromString(xml, "text/xml");
|
||||
var xmlAttrs = $("expr > attrs > attr", dom);
|
||||
|
||||
this.isOption = xmlAttrs.first().attr("name") == "_isOption";
|
||||
|
||||
if (!this.isOption)
|
||||
this.loadSubOptions(xmlAttrs);
|
||||
else
|
||||
this.loadOption(xmlAttrs);
|
||||
this.isLoaded = true;
|
||||
},
|
||||
|
||||
loadSubOptions: function (xmlAttrs) {
|
||||
var cur = this;
|
||||
var attrs = new Array();
|
||||
|
||||
xmlAttrs.each(
|
||||
function (index) {
|
||||
var name = $(this).attr("name");
|
||||
var attr = new Option(name, cur.context_, cur);
|
||||
attrs.push(attr);
|
||||
}
|
||||
);
|
||||
|
||||
this.subOptions = attrs;
|
||||
},
|
||||
|
||||
optionAttributeMap: {
|
||||
_isOption: function (cur, v) { },
|
||||
value: function (cur, v) { cur.value = xml2nix($(v).children().first()); },
|
||||
default: function (cur, v) { cur.defaultValue = xml2nix($(v).children().first()); },
|
||||
example: function (cur, v) { cur.example = xml2nix($(v).children().first()); },
|
||||
description: function (cur, v) { cur.description = this.string(v); },
|
||||
typename: function (cur, v) { cur.typename = this.string(v); },
|
||||
options: function (cur, v) { cur.loadSubOptions($("attrs", v).children()); },
|
||||
declarations: function (cur, v) { cur.declarations = this.pathList(v); },
|
||||
definitions: function (cur, v) { cur.definitions = this.pathList(v); },
|
||||
|
||||
string: function (v) {
|
||||
return $(v).children("string").first().attr("value");
|
||||
},
|
||||
|
||||
pathList: function (v) {
|
||||
var list = [];
|
||||
$(v).children("list").first().children().each(
|
||||
function (idx) {
|
||||
list.push($(this).attr("value"));
|
||||
}
|
||||
);
|
||||
return list;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
loadOption: function (attrs) {
|
||||
var cur = this;
|
||||
|
||||
attrs.each(
|
||||
function (index) {
|
||||
var name = $(this).attr("name");
|
||||
log("loadOption: " + name);
|
||||
cur.optionAttributeMap[name](cur, this);
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
// keep the context under which this option has been used.
|
||||
context_: null,
|
||||
// name of the option.
|
||||
name: "",
|
||||
// result of nixos-option.
|
||||
value: null,
|
||||
typename: null,
|
||||
defaultValue: null,
|
||||
example: null,
|
||||
description: "",
|
||||
declarations: [],
|
||||
definitions: [],
|
||||
// path to reach this option
|
||||
path: "",
|
||||
|
||||
// list of options accessible from here.
|
||||
isLoaded: false,
|
||||
isOption: false,
|
||||
subOptions: []
|
||||
};
|
||||
|
||||
var xml2nix_pptable = {
|
||||
attrs: function (node, depth, pp) {
|
||||
var children = node.children().not(
|
||||
function () {
|
||||
var name = $(this).attr("name");
|
||||
return name.charAt(0) == "_";
|
||||
}
|
||||
);
|
||||
var c = 0;
|
||||
var out = "";
|
||||
out += "{";
|
||||
depth += 1;
|
||||
children.each(
|
||||
function (idx) {
|
||||
c += 1;
|
||||
out += pp.indent(depth);
|
||||
out += pp.dispatch($(this), depth, pp);
|
||||
}
|
||||
);
|
||||
depth -= 1;
|
||||
if (c > 0)
|
||||
out += this.indent(depth);
|
||||
else
|
||||
out += " ";
|
||||
out += "}";
|
||||
return out;
|
||||
},
|
||||
list: function (node, depth, pp) {
|
||||
var children = node.children();
|
||||
var c = 0;
|
||||
var out = "";
|
||||
out += "[";
|
||||
depth += 1;
|
||||
children.each(
|
||||
function (idx) {
|
||||
c += 1;
|
||||
out += pp.indent(depth);
|
||||
out += pp.dispatch($(this), depth, pp);
|
||||
}
|
||||
);
|
||||
depth -= 1;
|
||||
if (c > 0)
|
||||
out += this.indent(depth);
|
||||
else
|
||||
out += " ";
|
||||
out += "]";
|
||||
return out;
|
||||
},
|
||||
attr: function (node, depth, pp) {
|
||||
var name = node.attr("name");
|
||||
var out = "";
|
||||
var val = "";
|
||||
out += name + " = ";
|
||||
depth += 1;
|
||||
val = pp.dispatch(node.children().first(), depth, pp);
|
||||
out += val;
|
||||
depth -= 1;
|
||||
out += ";";
|
||||
return out;
|
||||
},
|
||||
string: function (node, depth, pp) {
|
||||
return "\"" + node.attr("value") + "\"";
|
||||
},
|
||||
path: function (node, depth, pp) {
|
||||
return node.attr("value");
|
||||
},
|
||||
bool: function (node, depth, pp) {
|
||||
return node.attr("value");
|
||||
},
|
||||
"int": function (node, depth, pp) {
|
||||
return node.attr("value");
|
||||
},
|
||||
null: function (node, depth, pp) {
|
||||
return "null";
|
||||
},
|
||||
derivation: function (node, depth, pp) {
|
||||
return "<derivation>";
|
||||
},
|
||||
function: function (node, depth, pp) {
|
||||
return "<function>";
|
||||
},
|
||||
unevaluated: function (node, depth, pp) {
|
||||
return "<unevaluated>";
|
||||
},
|
||||
|
||||
dispatch: function (node, depth, pp) {
|
||||
for (var key in pp)
|
||||
{
|
||||
if(node.is(key))
|
||||
{
|
||||
// log(this.indent(depth) + "dispatch: " + key);
|
||||
var out = pp[key](node, depth, pp);
|
||||
// log(this.indent(depth) + "dispatch: => " + out);
|
||||
return out;
|
||||
}
|
||||
}
|
||||
return "<dispatch-error>";
|
||||
},
|
||||
indent: function (depth) {
|
||||
var ret = "\n";
|
||||
while (depth--)
|
||||
ret += " ";
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
|
||||
function xml2nix(node) {
|
||||
var depth = 0;
|
||||
var pp = xml2nix_pptable;
|
||||
var out = pp.dispatch(node, depth, pp);
|
||||
// log("pretty:\n" + out);
|
||||
return out;
|
||||
}
|
|
@ -1,242 +0,0 @@
|
|||
// extend NixOS options to handle the Tree View. Should be better to keep a
|
||||
// separation of concern here.
|
||||
|
||||
Option.prototype.tv_opened = false;
|
||||
Option.prototype.tv_size = 1;
|
||||
|
||||
Option.prototype.tv_open = function () {
|
||||
this.tv_opened = true;
|
||||
this.tv_size = 1;
|
||||
|
||||
// load an option if it is not loaded yet, and initialize them to be
|
||||
// read by the Option view.
|
||||
if (!this.isLoaded)
|
||||
this.load();
|
||||
|
||||
// If this is not an option, then add it's lits of sub-options size.
|
||||
if (!this.isOption)
|
||||
{
|
||||
for (var i = 0; i < this.subOptions.length; i++)
|
||||
this.tv_size += this.subOptions[i].tv_size;
|
||||
}
|
||||
};
|
||||
|
||||
Option.prototype.tv_close = function () {
|
||||
this.tv_opened = false;
|
||||
this.tv_size = 1;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
function OptionView (root, selCallback) {
|
||||
root.tv_open();
|
||||
this.rootOption = root;
|
||||
this.selCallback = selCallback;
|
||||
}
|
||||
|
||||
OptionView.prototype = {
|
||||
rootOption: null,
|
||||
selCallback: null,
|
||||
|
||||
// This function returns the path to option which is at the specified row.
|
||||
reach_cache: null,
|
||||
reachRow: function (row) {
|
||||
var o = this.rootOption; // Current option.
|
||||
var r = 0; // Number of rows traversed.
|
||||
var c = 0; // Child index.
|
||||
var path = [{ row: r, opt: o }]; // new Array();
|
||||
// hypothesis: this.rootOption.tv_size is always open and bigger than
|
||||
|
||||
// Use the previous returned value to avoid making to many checks and to
|
||||
// optimize for frequent access of near rows.
|
||||
if (this.reach_cache != null)
|
||||
{
|
||||
for (var i = this.reach_cache.length - 2; i >= 0; i--) {
|
||||
var p = this.reach_cache[i];
|
||||
// If we will have to go the same path.
|
||||
if (row >= p.row && row < p.row + p.opt.tv_size)
|
||||
{
|
||||
path.unshift(p);
|
||||
r = path[0].row;
|
||||
o = path[0].opt;
|
||||
}
|
||||
else
|
||||
break;
|
||||
};
|
||||
}
|
||||
|
||||
while (r != row)
|
||||
{
|
||||
// Go deeper in the child which contains the requested row. The
|
||||
// tv_size contains the size of the tree starting from each option.
|
||||
c = 0;
|
||||
while (c < o.subOptions.length && r + o.subOptions[c].tv_size < row)
|
||||
{
|
||||
r += o.subOptions[c].tv_size;
|
||||
c += 1;
|
||||
}
|
||||
if (c < o.subOptions.length && r + o.subOptions[c].tv_size >= row)
|
||||
{
|
||||
// Count the current option as a row.
|
||||
o = o.subOptions[c];
|
||||
r += 1;
|
||||
}
|
||||
else
|
||||
alert("WTF: " + o.name + " ask: " + row + " children: " + o.subOptions + " c: " + c);
|
||||
path.unshift({ row: r, opt: o });
|
||||
}
|
||||
|
||||
this.reach_cache = path;
|
||||
return path;
|
||||
},
|
||||
|
||||
// needs to return true if there is a /row/ at the same level /after/ a
|
||||
// given row.
|
||||
hasNextSibling: function(row, after) {
|
||||
log("sibling " + row + " after " + after);
|
||||
var path = reachRow(row);
|
||||
if (path.length > 1)
|
||||
{
|
||||
var last = path[1].row + path[1].opt.tv_size;
|
||||
// Has a next sibling if the row is not over the size of the
|
||||
// parent and if the current one is not the last child.
|
||||
return after + 1 < last && path[0].row + path[0].opt.tv_size < last;
|
||||
}
|
||||
else
|
||||
// The top-level option has no sibling.
|
||||
return false;
|
||||
},
|
||||
|
||||
// Does the current row contain any sub-options?
|
||||
isContainer: function(row) {
|
||||
return !this.reachRow(row)[0].opt.isOption;
|
||||
},
|
||||
isContainerEmpty: function(row) {
|
||||
return this.reachRow(row)[0].opt.subOptions.length == 0;
|
||||
},
|
||||
isContainerOpen: function(row) {
|
||||
return this.reachRow(row)[0].opt.tv_opened;
|
||||
},
|
||||
|
||||
// Open or close an option.
|
||||
toggleOpenState: function (row) {
|
||||
var path = this.reachRow(row);
|
||||
var delta = -path[0].opt.tv_size;
|
||||
if (path[0].opt.tv_opened)
|
||||
path[0].opt.tv_close();
|
||||
else
|
||||
path[0].opt.tv_open();
|
||||
delta += path[0].opt.tv_size;
|
||||
|
||||
// Parents are alreay opened, but we need to update the tv_size
|
||||
// counters. Thus we have to invalidate the reach cache.
|
||||
this.reach_cache = null;
|
||||
for (var i = 1; i < path.length; i++)
|
||||
path[i].opt.tv_open();
|
||||
|
||||
this.tree.rowCountChanged(row + 1, delta);
|
||||
},
|
||||
|
||||
// Return the identation level of the option at the line /row/. The
|
||||
// top-level level is 0.
|
||||
getLevel: function(row) {
|
||||
return this.reachRow(row).length - 1;
|
||||
},
|
||||
|
||||
// Obtain the index of a parent row. If there is no parent row,
|
||||
// returns -1.
|
||||
getParentIndex: function(row) {
|
||||
var path = this.reachRow(row);
|
||||
if (path.length > 1)
|
||||
return path[1].row;
|
||||
else
|
||||
return -1;
|
||||
},
|
||||
|
||||
|
||||
// Return the content of each row base on the column name.
|
||||
getCellText: function(row, column) {
|
||||
if (column.id == "opt-name")
|
||||
return this.reachRow(row)[0].opt.name;
|
||||
if (column.id == "dbg-size")
|
||||
return this.reachRow(row)[0].opt.tv_size;
|
||||
return "";
|
||||
},
|
||||
|
||||
// We have no column with images.
|
||||
getCellValue: function(row, column) { },
|
||||
|
||||
|
||||
isSelectable: function(row, column) { return true; },
|
||||
|
||||
// Get the selection out of the tree and give options to the call back
|
||||
// function.
|
||||
selectionChanged: function() {
|
||||
if (this.selCallback == null)
|
||||
return;
|
||||
var opts = [];
|
||||
var start = new Object();
|
||||
var end = new Object();
|
||||
var numRanges = this.tree.view.selection.getRangeCount();
|
||||
|
||||
for (var t = 0; t < numRanges; t++) {
|
||||
this.tree.view.selection.getRangeAt(t,start,end);
|
||||
for (var v = start.value; v <= end.value; v++) {
|
||||
var opt = this.reachRow(v)[0].opt;
|
||||
if (!opt.isLoaded)
|
||||
opt.load();
|
||||
if (opt.isOption)
|
||||
opts.push(opt);
|
||||
|
||||
// FIXME: no need to make things slowing down, because our current
|
||||
// callback do not handle multiple option display.
|
||||
if (!opts.empty)
|
||||
break;
|
||||
}
|
||||
// FIXME: no need to make things slowing down, because our current
|
||||
// callback do not handle multiple option display.
|
||||
if (!opts.empty)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!opts.empty)
|
||||
this.selCallback(opts);
|
||||
},
|
||||
|
||||
set rowCount(c) { throw "rowCount is a readonly property"; },
|
||||
get rowCount() { return this.rootOption.tv_size; },
|
||||
|
||||
// refuse drag-n-drop of options.
|
||||
canDrop: function (index, orientation, dataTransfer) { return false; },
|
||||
drop: function (index, orientation, dataTransfer) { },
|
||||
|
||||
// ?
|
||||
getCellProperties: function(row, column, prop) { },
|
||||
getColumnProperties: function(column, prop) { },
|
||||
getRowProperties: function(row, prop) { },
|
||||
getImageSrc: function(row, column) { },
|
||||
|
||||
// No progress columns are used.
|
||||
getProgressMode: function(row, column) { },
|
||||
|
||||
// Do not add options yet.
|
||||
isEditable: function(row, column) { return false; },
|
||||
setCellValue: function(row, column, value) { },
|
||||
setCellText: function(row, column, value) { },
|
||||
|
||||
// ...
|
||||
isSeparator: function(index) { return false; },
|
||||
isSorted: function() { return false; },
|
||||
performAction: function(action) { },
|
||||
performActionOnCell: function(action, row, column) { },
|
||||
performActionOnRow: function(action, row) { }, // ??
|
||||
|
||||
// ??
|
||||
cycleCell: function (row, col) { },
|
||||
cycleHeader: function(col) { },
|
||||
|
||||
selection: null,
|
||||
tree: null,
|
||||
setTree: function(tree) { this.tree = tree; }
|
||||
};
|
|
@ -1,154 +0,0 @@
|
|||
const nsIAppShellService = Components.interfaces.nsIAppShellService;
|
||||
const nsISupports = Components.interfaces.nsISupports;
|
||||
const nsICategoryManager = Components.interfaces.nsICategoryManager;
|
||||
const nsIComponentRegistrar = Components.interfaces.nsIComponentRegistrar;
|
||||
const nsICommandLine = Components.interfaces.nsICommandLine;
|
||||
const nsICommandLineHandler = Components.interfaces.nsICommandLineHandler;
|
||||
const nsIFactory = Components.interfaces.nsIFactory;
|
||||
const nsIModule = Components.interfaces.nsIModule;
|
||||
const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
|
||||
|
||||
// CHANGEME: to the chrome URI of your extension or application
|
||||
const CHROME_URI = "chrome://nixos-gui/content/myviewer.xul";
|
||||
|
||||
// CHANGEME: change the contract id, CID, and category to be unique
|
||||
// to your application.
|
||||
const clh_contractID = "@mozilla.org/commandlinehandler/general-startup;1?type=myapp";
|
||||
|
||||
// use uuidgen to generate a unique ID
|
||||
const clh_CID = Components.ID("{2991c315-b871-42cd-b33f-bfee4fcbf682}");
|
||||
|
||||
// category names are sorted alphabetically. Typical command-line handlers use a
|
||||
// category that begins with the letter "m".
|
||||
const clh_category = "m-myapp";
|
||||
|
||||
/**
|
||||
* Utility functions
|
||||
*/
|
||||
|
||||
/**
|
||||
* Opens a chrome window.
|
||||
* @param aChromeURISpec a string specifying the URI of the window to open.
|
||||
* @param aArgument an argument to pass to the window (may be null)
|
||||
*/
|
||||
function openWindow(aChromeURISpec, aArgument)
|
||||
{
|
||||
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"].
|
||||
getService(Components.interfaces.nsIWindowWatcher);
|
||||
ww.openWindow(null, aChromeURISpec, "_blank",
|
||||
"chrome,menubar,toolbar,status,resizable,dialog=no",
|
||||
aArgument);
|
||||
}
|
||||
|
||||
/**
|
||||
* The XPCOM component that implements nsICommandLineHandler.
|
||||
* It also implements nsIFactory to serve as its own singleton factory.
|
||||
*/
|
||||
const myAppHandler = {
|
||||
/* nsISupports */
|
||||
QueryInterface : function clh_QI(iid)
|
||||
{
|
||||
if (iid.equals(nsICommandLineHandler) ||
|
||||
iid.equals(nsIFactory) ||
|
||||
iid.equals(nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
/* nsICommandLineHandler */
|
||||
|
||||
handle : function clh_handle(cmdLine)
|
||||
{
|
||||
openWindow(CHROME_URI, cmdLine);
|
||||
cmdLine.preventDefault = true;
|
||||
},
|
||||
|
||||
// CHANGEME: change the help info as appropriate, but
|
||||
// follow the guidelines in nsICommandLineHandler.idl
|
||||
// specifically, flag descriptions should start at
|
||||
// character 24, and lines should be wrapped at
|
||||
// 72 characters with embedded newlines,
|
||||
// and finally, the string should end with a newline
|
||||
helpInfo : " <filename> Open the file in the viewer\n",
|
||||
|
||||
/* nsIFactory */
|
||||
|
||||
createInstance : function clh_CI(outer, iid)
|
||||
{
|
||||
if (outer != null)
|
||||
throw Components.results.NS_ERROR_NO_AGGREGATION;
|
||||
|
||||
return this.QueryInterface(iid);
|
||||
},
|
||||
|
||||
lockFactory : function clh_lock(lock)
|
||||
{
|
||||
/* no-op */
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* The XPCOM glue that implements nsIModule
|
||||
*/
|
||||
const myAppHandlerModule = {
|
||||
/* nsISupports */
|
||||
QueryInterface : function mod_QI(iid)
|
||||
{
|
||||
if (iid.equals(nsIModule) ||
|
||||
iid.equals(nsISupports))
|
||||
return this;
|
||||
|
||||
throw Components.results.NS_ERROR_NO_INTERFACE;
|
||||
},
|
||||
|
||||
/* nsIModule */
|
||||
getClassObject : function mod_gch(compMgr, cid, iid)
|
||||
{
|
||||
if (cid.equals(clh_CID))
|
||||
return myAppHandler.QueryInterface(iid);
|
||||
|
||||
throw Components.results.NS_ERROR_NOT_REGISTERED;
|
||||
},
|
||||
|
||||
registerSelf : function mod_regself(compMgr, fileSpec, location, type)
|
||||
{
|
||||
compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
|
||||
compMgr.registerFactoryLocation(clh_CID,
|
||||
"myAppHandler",
|
||||
clh_contractID,
|
||||
fileSpec,
|
||||
location,
|
||||
type);
|
||||
|
||||
var catMan = Components.classes["@mozilla.org/categorymanager;1"].
|
||||
getService(nsICategoryManager);
|
||||
catMan.addCategoryEntry("command-line-handler",
|
||||
clh_category,
|
||||
clh_contractID, true, true);
|
||||
},
|
||||
|
||||
unregisterSelf : function mod_unreg(compMgr, location, type)
|
||||
{
|
||||
compMgr.QueryInterface(nsIComponentRegistrar);
|
||||
compMgr.unregisterFactoryLocation(clh_CID, location);
|
||||
|
||||
var catMan = Components.classes["@mozilla.org/categorymanager;1"].
|
||||
getService(nsICategoryManager);
|
||||
catMan.deleteCategoryEntry("command-line-handler", clh_category);
|
||||
},
|
||||
|
||||
canUnload : function (compMgr)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
/* The NSGetModule function is the magic entry point that XPCOM uses to find what XPCOM objects
|
||||
* this component provides
|
||||
*/
|
||||
function NSGetModule(comMgr, fileSpec)
|
||||
{
|
||||
return myAppHandlerModule;
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
pref("toolkit.defaultChromeURI", "chrome://nixos-gui/content/myviewer.xul");
|
||||
pref("general.useragent.extra.myviewer", "NixOS gui/0.0");
|
||||
|
||||
/* debugging prefs */
|
||||
pref("browser.dom.window.dump.enabled", true); // enable output to stderr
|
||||
pref("javascript.options.showInConsole", true); // show javascript errors from chrome: files in the jsconsole
|
||||
pref("javascript.options.strict", true); // show javascript strict warnings in the jsconsole
|
||||
|
||||
/* disable xul cache so that modifications to chrome: files apply without restarting xulrunner */
|
||||
pref("nglayout.debug.disable_xul_cache", true);
|
||||
pref("nglayout.debug.disable_xul_fastload", true);
|
|
@ -12,8 +12,7 @@ with lib;
|
|||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Turn on this option if you want to enable all the firmware shipped with Debian/Ubuntu
|
||||
and iwlwifi.
|
||||
Turn on this option if you want to enable all the firmware shipped in linux-firmware.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -26,7 +25,6 @@ with lib;
|
|||
hardware.firmware = [
|
||||
"${pkgs.firmwareLinuxNonfree}/lib/firmware"
|
||||
"${pkgs.iwlegacy}/lib/firmware"
|
||||
"${pkgs.iwlwifi}/lib/firmware"
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@ let
|
|||
|
||||
efiImg = pkgs.runCommand "efi-image_eltorito" { buildInputs = [ pkgs.mtools ]; }
|
||||
''
|
||||
#Let's hope 10M is enough
|
||||
dd bs=2048 count=5120 if=/dev/zero of="$out"
|
||||
#Let's hope 15M is enough
|
||||
dd bs=2048 count=7680 if=/dev/zero of="$out"
|
||||
${pkgs.dosfstools}/sbin/mkfs.vfat "$out"
|
||||
mcopy -svi "$out" ${efiDir}/* ::
|
||||
mmd -i "$out" boot
|
||||
|
|
|
@ -53,46 +53,9 @@ let
|
|||
inherit (config.system) nixosVersion nixosCodeName;
|
||||
};
|
||||
|
||||
/*
|
||||
nixos-gui = pkgs.xulrunnerWrapper {
|
||||
launcher = "nixos-gui";
|
||||
application = pkgs.stdenv.mkDerivation {
|
||||
name = "nixos-gui";
|
||||
buildCommand = ''
|
||||
cp -r "$gui" "$out"
|
||||
|
||||
# Do not force the copy if the file exists in the sources (this
|
||||
# happens for developpers)
|
||||
test -e "$out/chrome/content/jquery-1.5.2.js" ||
|
||||
cp -f "$jquery" "$out/chrome/content/jquery-1.5.2.js"
|
||||
'';
|
||||
gui = lib.cleanSource "${modulesPath}/../gui";
|
||||
jquery = pkgs.fetchurl {
|
||||
url = http://code.jquery.com/jquery-1.5.2.min.js;
|
||||
sha256 = "8f0a19ee8c606b35a10904951e0a27da1896eafe33c6e88cb7bcbe455f05a24a";
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
in
|
||||
|
||||
{
|
||||
/*
|
||||
options = {
|
||||
|
||||
installer.enableGraphicalTools = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
description = ''
|
||||
Enable the installation of graphical tools.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
*/
|
||||
|
||||
config = {
|
||||
environment.systemPackages =
|
||||
[ nixos-build-vms
|
||||
|
|
|
@ -177,6 +177,8 @@
|
|||
cadvisor = 167;
|
||||
nylon = 168;
|
||||
apache-kafka = 169;
|
||||
panamax = 170;
|
||||
|
||||
# When adding a uid, make sure it doesn't match an existing gid. And don't use uids above 399!
|
||||
|
||||
nixbld = 30000; # start of range of uids
|
||||
|
@ -315,6 +317,7 @@
|
|||
kubernetes = 162;
|
||||
gitlab = 165;
|
||||
nylon = 166;
|
||||
panamax = 170;
|
||||
|
||||
# When adding a gid, make sure it doesn't match an existing
|
||||
# uid. Users and groups with the same name should have equal
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
./programs/atop.nix
|
||||
./programs/bash/bash.nix
|
||||
./programs/blcr.nix
|
||||
./programs/cdemu.nix
|
||||
./programs/command-not-found/command-not-found.nix
|
||||
./programs/dconf.nix
|
||||
./programs/environment.nix
|
||||
|
@ -104,6 +105,7 @@
|
|||
./services/backup/tarsnap.nix
|
||||
./services/cluster/fleet.nix
|
||||
./services/cluster/kubernetes.nix
|
||||
./services/cluster/panamax.nix
|
||||
./services/computing/torque/server.nix
|
||||
./services/computing/torque/mom.nix
|
||||
./services/continuous-integration/jenkins/default.nix
|
||||
|
@ -172,6 +174,7 @@
|
|||
./services/mail/spamassassin.nix
|
||||
./services/misc/apache-kafka.nix
|
||||
#./services/misc/autofs.nix
|
||||
./services/misc/canto-daemon.nix
|
||||
./services/misc/cpuminer-cryptonight.nix
|
||||
./services/misc/cgminer.nix
|
||||
./services/misc/dictd.nix
|
||||
|
@ -286,6 +289,7 @@
|
|||
./services/networking/searx.nix
|
||||
./services/networking/seeks.nix
|
||||
./services/networking/spiped.nix
|
||||
./services/networking/sslh.nix
|
||||
./services/networking/ssh/lshd.nix
|
||||
./services/networking/ssh/sshd.nix
|
||||
./services/networking/strongswan.nix
|
||||
|
|
49
nixos/modules/programs/cdemu.nix
Normal file
49
nixos/modules/programs/cdemu.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let cfg = config.programs.cdemu;
|
||||
in {
|
||||
|
||||
options = {
|
||||
programs.cdemu = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
description = "Whether to enable cdemu for users of appropriate group (default cdrom)";
|
||||
};
|
||||
group = mkOption {
|
||||
default = "cdrom";
|
||||
description = "Required group for users of cdemu";
|
||||
};
|
||||
gui = mkOption {
|
||||
default = true;
|
||||
description = "Whether to install cdemu GUI (gCDEmu)";
|
||||
};
|
||||
image-analyzer = mkOption {
|
||||
default = true;
|
||||
description = "Whether to install image analyzer";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
boot = {
|
||||
extraModulePackages = [ pkgs.linuxPackages.vhba ];
|
||||
kernelModules = [ "vhba" ];
|
||||
};
|
||||
|
||||
services = {
|
||||
udev.extraRules = ''
|
||||
KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="${cfg.group}"
|
||||
'';
|
||||
dbus.packages = [ pkgs.cdemu-daemon ];
|
||||
};
|
||||
|
||||
environment.systemPackages =
|
||||
[ pkgs.cdemu-daemon pkgs.cdemu-client ]
|
||||
++ optional cfg.gui pkgs.gcdemu
|
||||
++ optional cfg.image-analyzer pkgs.image-analyzer;
|
||||
};
|
||||
|
||||
}
|
|
@ -100,6 +100,7 @@ in {
|
|||
script = "exec mpd --no-daemon ${mpdConf}";
|
||||
serviceConfig = {
|
||||
User = "mpd";
|
||||
PermissionsStartOnly = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
153
nixos/modules/services/cluster/panamax.nix
Normal file
153
nixos/modules/services/cluster/panamax.nix
Normal file
|
@ -0,0 +1,153 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.panamax;
|
||||
|
||||
panamax_api = pkgs.panamax_api.override { dataDir = cfg.dataDir + "/api"; };
|
||||
panamax_ui = pkgs.panamax_ui.override { dataDir = cfg.dataDir + "/ui"; };
|
||||
|
||||
in {
|
||||
|
||||
##### Interface
|
||||
options.services.panamax = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable Panamax service.
|
||||
'';
|
||||
};
|
||||
|
||||
UIPort = mkOption {
|
||||
type = types.int;
|
||||
default = 8888;
|
||||
description = ''
|
||||
Panamax UI listening port.
|
||||
'';
|
||||
};
|
||||
|
||||
APIPort = mkOption {
|
||||
type = types.int;
|
||||
default = 3000;
|
||||
description = ''
|
||||
Panamax UI listening port.
|
||||
'';
|
||||
};
|
||||
|
||||
dataDir = mkOption {
|
||||
type = types.str;
|
||||
default = "/var/lib/panamax";
|
||||
description = ''
|
||||
Data dir for Panamax.
|
||||
'';
|
||||
};
|
||||
|
||||
fleetctlEndpoint = mkOption {
|
||||
type = types.str;
|
||||
default = "http://127.0.0.1:4001";
|
||||
description = ''
|
||||
Panamax fleetctl endpoint.
|
||||
'';
|
||||
};
|
||||
|
||||
journalEndpoint = mkOption {
|
||||
type = types.str;
|
||||
default = "http://127.0.0.1:19531";
|
||||
description = ''
|
||||
Panamax journal endpoint.
|
||||
'';
|
||||
};
|
||||
|
||||
secretKey = mkOption {
|
||||
type = types.str;
|
||||
default = "SomethingVeryLong.";
|
||||
description = ''
|
||||
Panamax secret key (do change this).
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
##### Implementation
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.panamax-api = {
|
||||
description = "Panamax API";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "fleet.service" "etcd.service" "docker.service" ];
|
||||
|
||||
path = [ panamax_api ];
|
||||
environment = {
|
||||
RAILS_ENV = "production";
|
||||
JOURNAL_ENDPOINT = cfg.journalEndpoint;
|
||||
FLEETCTL_ENDPOINT = cfg.fleetctlEndpoint;
|
||||
PANAMAX_DATABASE_PATH = "${cfg.dataDir}/api/db/mnt/db.sqlite3";
|
||||
};
|
||||
|
||||
preStart = ''
|
||||
rm -rf ${cfg.dataDir}/state/tmp
|
||||
mkdir -p ${cfg.dataDir}/api/{db/mnt,state/log,state/tmp}
|
||||
ln -sf ${panamax_api}/share/panamax-api/_db/{schema.rb,seeds.rb,migrate} ${cfg.dataDir}/api/db/
|
||||
|
||||
if [ ! -f ${cfg.dataDir}/.created ]; then
|
||||
bundle exec rake db:setup
|
||||
bundle exec rake db:seed
|
||||
bundle exec rake panamax:templates:load || true
|
||||
touch ${cfg.dataDir}/.created
|
||||
else
|
||||
bundle exec rake db:migrate
|
||||
fi
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${panamax_api}/bin/bundle exec rails server --binding 127.0.0.1 --port ${toString cfg.APIPort}";
|
||||
User = "panamax";
|
||||
Group = "panamax";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.panamax-ui = {
|
||||
description = "Panamax UI";
|
||||
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "network.target" "panamax_api.service" ];
|
||||
|
||||
path = [ panamax_ui ];
|
||||
environment = {
|
||||
RAILS_ENV = "production";
|
||||
JOURNAL_ENDPOINT = cfg.journalEndpoint;
|
||||
PMX_API_PORT_3000_TCP_ADDR = "localhost";
|
||||
PMX_API_PORT_3000_TCP_PORT = toString cfg.APIPort;
|
||||
SECRET_KEY_BASE = cfg.secretKey;
|
||||
};
|
||||
|
||||
preStart = ''
|
||||
rm -rf ${cfg.dataDir}/state/tmp
|
||||
mkdir -p ${cfg.dataDir}/ui/state/{log,tmp}
|
||||
'';
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = "${panamax_ui}/bin/bundle exec rails server --binding 127.0.0.1 --port ${toString cfg.UIPort}";
|
||||
User = "panamax";
|
||||
Group = "panamax";
|
||||
};
|
||||
};
|
||||
|
||||
users.extraUsers.panamax =
|
||||
{ uid = config.ids.uids.panamax;
|
||||
description = "Panamax user";
|
||||
createHome = true;
|
||||
home = cfg.dataDir;
|
||||
extraGroups = [ "docker" ];
|
||||
};
|
||||
|
||||
services.journald.enableHttpGateway = mkDefault true;
|
||||
services.fleet.enable = mkDefault true;
|
||||
virtualisation.docker.enable = mkDefault true;
|
||||
|
||||
environment.systemPackages = [ panamax_api panamax_ui ];
|
||||
users.extraGroups.panamax.gid = config.ids.gids.panamax;
|
||||
};
|
||||
}
|
37
nixos/modules/services/misc/canto-daemon.nix
Normal file
37
nixos/modules/services/misc/canto-daemon.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
|
||||
cfg = config.services.canto-daemon;
|
||||
|
||||
in {
|
||||
|
||||
##### interface
|
||||
|
||||
options = {
|
||||
|
||||
services.canto-daemon = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to enable the canto RSS daemon.";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
##### implementation
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
systemd.user.services.canto-daemon = {
|
||||
description = "Canto RSS Daemon";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig.ExecStart = "${pkgs.canto-daemon}/bin/canto-daemon";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
|
@ -6,25 +6,11 @@ let
|
|||
|
||||
cfg = config.services.samba;
|
||||
|
||||
logDir = "/var/log/samba";
|
||||
privateDir = "/var/samba/private";
|
||||
|
||||
samba = cfg.package;
|
||||
|
||||
setupScript =
|
||||
''
|
||||
if ! test -d /var/samba ; then
|
||||
mkdir -p /var/samba/locks /var/samba/cores/nmbd /var/samba/cores/smbd /var/samba/cores/winbindd
|
||||
fi
|
||||
|
||||
passwdFile="$(${pkgs.gnused}/bin/sed -n 's/^.*smb[ ]\+passwd[ ]\+file[ ]\+=[ ]\+\(.*\)/\1/p' ${configFile})"
|
||||
if [ -n "$passwdFile" ]; then
|
||||
echo 'INFO: [samba] creating directory containing passwd file'
|
||||
mkdir -p "$(dirname "$passwdFile")"
|
||||
fi
|
||||
|
||||
mkdir -p ${logDir}
|
||||
mkdir -p ${privateDir}
|
||||
mkdir -p /var/lock/samba /var/log/samba /var/cache/samba /var/lib/samba/private
|
||||
'';
|
||||
|
||||
shareConfig = name:
|
||||
|
@ -39,9 +25,10 @@ let
|
|||
(if cfg.configText != null then cfg.configText else
|
||||
''
|
||||
[ global ]
|
||||
log file = ${logDir}/log.%m
|
||||
private dir = ${privateDir}
|
||||
${optionalString cfg.syncPasswordsByPam "pam password change = true"}
|
||||
security = ${cfg.securityType}
|
||||
passwd program = /var/setuid-wrappers/passwd %u
|
||||
pam password change = ${toString cfg.syncPasswordsByPam}
|
||||
invalid users = ${toString cfg.invalidUsers}
|
||||
|
||||
${cfg.extraConfig}
|
||||
|
||||
|
@ -83,14 +70,16 @@ in
|
|||
services.samba = {
|
||||
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "
|
||||
description = ''
|
||||
Whether to enable Samba, which provides file and print
|
||||
services to Windows clients through the SMB/CIFS protocol.
|
||||
";
|
||||
'';
|
||||
};
|
||||
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.samba;
|
||||
example = pkgs.samba4;
|
||||
description = ''
|
||||
|
@ -99,72 +88,47 @@ in
|
|||
};
|
||||
|
||||
syncPasswordsByPam = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "
|
||||
enabling this will add a line directly after pam_unix.so.
|
||||
description = ''
|
||||
Enabling this will add a line directly after pam_unix.so.
|
||||
Whenever a password is changed the samba password will be updated as well.
|
||||
However you still yave to add the samba password once using smbpasswd -a user
|
||||
If you don't want to maintain an extra pwd database you still can send plain text
|
||||
passwords which is not secure.
|
||||
";
|
||||
'';
|
||||
};
|
||||
|
||||
invalidUsers = mkOption {
|
||||
type = types.listOf types.str;
|
||||
default = [ "root" ];
|
||||
description = ''
|
||||
List of users who are denied to login via Samba.
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = mkOption {
|
||||
# !!! Bad default.
|
||||
default = ''
|
||||
# [global] continuing global section here, section is started by nix to set pids etc
|
||||
|
||||
smb passwd file = /etc/samba/passwd
|
||||
|
||||
# is this useful ?
|
||||
domain master = auto
|
||||
|
||||
encrypt passwords = Yes
|
||||
client plaintext auth = No
|
||||
|
||||
# yes: if you use this you probably also want to enable syncPasswordsByPam
|
||||
# no: You can still use the pam password database. However
|
||||
# passwords will be sent plain text on network (discouraged)
|
||||
|
||||
workgroup = Users
|
||||
server string = %h
|
||||
comment = Samba
|
||||
log file = /var/log/samba/log.%m
|
||||
log level = 10
|
||||
max log size = 50000
|
||||
security = ${cfg.securityType}
|
||||
|
||||
client lanman auth = Yes
|
||||
dns proxy = no
|
||||
invalid users = root
|
||||
passdb backend = tdbsam
|
||||
passwd program = /usr/bin/passwd %u
|
||||
type = types.lines;
|
||||
default = "";
|
||||
description = ''
|
||||
Additional global section and extra section lines go in here.
|
||||
'';
|
||||
|
||||
description = "
|
||||
additional global section and extra section lines go in here.
|
||||
";
|
||||
};
|
||||
|
||||
configFile = mkOption {
|
||||
description = "
|
||||
internal use to pass filepath to samba pam module
|
||||
";
|
||||
};
|
||||
|
||||
configText = mkOption {
|
||||
type = types.nullOr types.lines;
|
||||
default = null;
|
||||
description = "
|
||||
description = ''
|
||||
Verbatim contents of smb.conf. If null (default), use the
|
||||
autogenerated file from NixOS instead.
|
||||
";
|
||||
'';
|
||||
};
|
||||
|
||||
securityType = mkOption {
|
||||
description = "Samba security type";
|
||||
type = types.str;
|
||||
default = "user";
|
||||
example = "share";
|
||||
description = "Samba security type";
|
||||
};
|
||||
|
||||
nsswins = mkOption {
|
||||
|
@ -179,12 +143,11 @@ in
|
|||
|
||||
shares = mkOption {
|
||||
default = {};
|
||||
description =
|
||||
''
|
||||
description = ''
|
||||
A set describing shared resources.
|
||||
See <command>man smb.conf</command> for options.
|
||||
'';
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
'';
|
||||
type = types.attrsOf (types.attrsOf types.unspecified);
|
||||
example =
|
||||
{ srv =
|
||||
{ path = "/srv";
|
||||
|
|
|
@ -64,6 +64,8 @@ in
|
|||
systemd.services.openntpd = {
|
||||
description = "OpenNTP Server";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
after = [ "dnsmasq.service" "bind.service" "network-online.target" ];
|
||||
serviceConfig.ExecStart = "${package}/sbin/ntpd -d -f ${cfgFile} ${cfg.extraOptions}";
|
||||
};
|
||||
};
|
||||
|
|
83
nixos/modules/services/networking/sslh.nix
Normal file
83
nixos/modules/services/networking/sslh.nix
Normal file
|
@ -0,0 +1,83 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.services.sslh;
|
||||
configFile = pkgs.writeText "sslh.conf" ''
|
||||
verbose: ${if cfg.verbose then "true" else "false"};
|
||||
foreground: false;
|
||||
inetd: false;
|
||||
numeric: false;
|
||||
transparent: false;
|
||||
timeout: "${toString cfg.timeout}";
|
||||
user: "nobody";
|
||||
pidfile: "/run/sslh.pid";
|
||||
|
||||
listen:
|
||||
(
|
||||
{ host: "${cfg.host}"; port: "${toString cfg.port}"; }
|
||||
);
|
||||
|
||||
${cfg.appendConfig}
|
||||
'';
|
||||
defaultAppendConfig = ''
|
||||
protocols:
|
||||
(
|
||||
{ name: "ssh"; service: "ssh"; host: "localhost"; port: "22"; probe: "builtin"; },
|
||||
{ name: "openvpn"; host: "localhost"; port: "1194"; probe: "builtin"; },
|
||||
{ name: "xmpp"; host: "localhost"; port: "5222"; probe: "builtin"; },
|
||||
{ name: "http"; host: "localhost"; port: "80"; probe: "builtin"; },
|
||||
{ name: "ssl"; host: "localhost"; port: "443"; probe: "builtin"; },
|
||||
{ name: "anyprot"; host: "localhost"; port: "443"; probe: "builtin"; }
|
||||
);
|
||||
'';
|
||||
in
|
||||
{
|
||||
options = {
|
||||
services.sslh = {
|
||||
enable = mkEnableOption "sslh";
|
||||
|
||||
verbose = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Verbose logs.";
|
||||
};
|
||||
|
||||
timeout = mkOption {
|
||||
type = types.int;
|
||||
default = 2;
|
||||
description = "Timeout in seconds.";
|
||||
};
|
||||
|
||||
host = mkOption {
|
||||
type = types.str;
|
||||
default = config.networking.hostName;
|
||||
description = "Listening hostname.";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.int;
|
||||
default = 443;
|
||||
description = "Listening port.";
|
||||
};
|
||||
|
||||
appendConfig = mkOption {
|
||||
type = types.str;
|
||||
default = defaultAppendConfig;
|
||||
description = "Verbatim configuration file.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.services.sslh = {
|
||||
description = "Applicative Protocol Multiplexer (e.g. share SSH and HTTPS on the same port)";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.ExecStart = "${pkgs.sslh}/bin/sslh -F ${configFile}";
|
||||
serviceConfig.KillMode = "process";
|
||||
serviceConfig.PIDFile = "/run/sslh.pid";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -71,7 +71,7 @@ in
|
|||
};
|
||||
|
||||
package = mkOption {
|
||||
default = pkgs.tinc;
|
||||
default = pkgs.tinc_pre;
|
||||
description = ''
|
||||
The package to use for the tinc daemon's binary.
|
||||
'';
|
||||
|
@ -131,14 +131,22 @@ in
|
|||
preStart = ''
|
||||
mkdir -p /etc/tinc/${network}/hosts
|
||||
|
||||
# Prefer ED25519 keys (only in 1.1+)
|
||||
[ -f "/etc/tinc/${network}/ed25519_key.priv" ] || tinc -n ${network} generate-ed25519-keys
|
||||
# Determine how we should generate our keys
|
||||
if type tinc >/dev/null 2>&1; then
|
||||
# Tinc 1.1+ uses the tinc helper application for key generation
|
||||
|
||||
# Otherwise use RSA keys
|
||||
[ -f "/etc/tinc/${network}/rsa_key.priv" ] || tinc -n ${network} generate-rsa-keys 4096
|
||||
# Prefer ED25519 keys (only in 1.1+)
|
||||
[ -f "/etc/tinc/${network}/ed25519_key.priv" ] || tinc -n ${network} generate-ed25519-keys
|
||||
|
||||
# Otherwise use RSA keys
|
||||
[ -f "/etc/tinc/${network}/rsa_key.priv" ] || tinc -n ${network} generate-rsa-keys 4096
|
||||
else
|
||||
# Tinc 1.0 uses the tincd application
|
||||
[ -f "/etc/tinc/${network}/rsa_key.priv" ] || tincd -n ${network} -K 4096
|
||||
fi
|
||||
'';
|
||||
script = ''
|
||||
${data.package}/sbin/tincd -D -U tinc.${network} -n ${network} --pidfile /run/tinc.${network}.pid -d ${toString data.debugLevel}
|
||||
tincd -D -U tinc.${network} -n ${network} --pidfile /run/tinc.${network}.pid -d ${toString data.debugLevel}
|
||||
'';
|
||||
})
|
||||
);
|
||||
|
|
|
@ -7,19 +7,19 @@ let
|
|||
in
|
||||
|
||||
{
|
||||
imports =
|
||||
[ ./compiz.nix
|
||||
./openbox.nix
|
||||
./metacity.nix
|
||||
./none.nix
|
||||
./twm.nix
|
||||
./wmii.nix
|
||||
./xmonad.nix
|
||||
./i3.nix
|
||||
./herbstluftwm.nix
|
||||
./bspwm.nix
|
||||
./stumpwm.nix
|
||||
];
|
||||
imports = [
|
||||
./bspwm.nix
|
||||
./compiz.nix
|
||||
./herbstluftwm.nix
|
||||
./i3.nix
|
||||
./metacity.nix
|
||||
./openbox.nix
|
||||
./stumpwm.nix
|
||||
./twm.nix
|
||||
./windowmaker.nix
|
||||
./wmii.nix
|
||||
./xmonad.nix
|
||||
./none.nix ];
|
||||
|
||||
options = {
|
||||
|
||||
|
@ -61,4 +61,4 @@ in
|
|||
config = {
|
||||
services.xserver.displayManager.session = cfg.session;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -193,6 +193,7 @@ in
|
|||
"ohci_hcd"
|
||||
"ohci_pci"
|
||||
"xhci_hcd"
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"hid_generic"
|
||||
"hid_apple" "hid_logitech_dj" "hid_lenovo_tpkbd" "hid_roccat"
|
||||
|
|
|
@ -6,6 +6,8 @@ let
|
|||
|
||||
cfg = config.boot.loader.grub;
|
||||
|
||||
efi = config.boot.loader.efi;
|
||||
|
||||
realGrub = if cfg.version == 1 then pkgs.grub
|
||||
else pkgs.grub2.override { zfsSupport = cfg.zfsSupport; };
|
||||
|
||||
|
@ -16,21 +18,31 @@ let
|
|||
then null
|
||||
else realGrub;
|
||||
|
||||
grubEfi =
|
||||
# EFI version of Grub v2
|
||||
if (cfg.devices != ["nodev"]) && cfg.efiSupport && (cfg.version == 2)
|
||||
then pkgs.grub2.override { zfsSupport = cfg.zfsSupport; efiSupport = cfg.efiSupport; }
|
||||
else null;
|
||||
|
||||
f = x: if x == null then "" else "" + x;
|
||||
|
||||
grubConfig = pkgs.writeText "grub-config.xml" (builtins.toXML
|
||||
{ splashImage = f config.boot.loader.grub.splashImage;
|
||||
grub = f grub;
|
||||
grubTarget = f (grub.grubTarget or "");
|
||||
shell = "${pkgs.stdenv.shell}";
|
||||
fullVersion = (builtins.parseDrvName realGrub.name).version;
|
||||
grubEfi = f grubEfi;
|
||||
grubTargetEfi = if cfg.efiSupport && (cfg.version == 2) then f grubEfi.grubTarget else "";
|
||||
inherit (efi) efiSysMountPoint canTouchEfiVariables;
|
||||
inherit (cfg)
|
||||
version extraConfig extraPerEntryConfig extraEntries
|
||||
extraEntriesBeforeNixOS extraPrepareConfig configurationLimit copyKernels timeout
|
||||
default devices fsIdentifier;
|
||||
path = (makeSearchPath "bin" [
|
||||
default devices fsIdentifier efiSupport;
|
||||
path = (makeSearchPath "bin" ([
|
||||
pkgs.coreutils pkgs.gnused pkgs.gnugrep pkgs.findutils pkgs.diffutils pkgs.btrfsProgs
|
||||
pkgs.utillinux
|
||||
]) + ":" + (makeSearchPath "sbin" [
|
||||
pkgs.utillinux ] ++ (if cfg.efiSupport && (cfg.version == 2) then [pkgs.efibootmgr ] else [])
|
||||
)) + ":" + (makeSearchPath "sbin" [
|
||||
pkgs.mdadm pkgs.utillinux
|
||||
]);
|
||||
});
|
||||
|
@ -231,6 +243,18 @@ in
|
|||
type = types.bool;
|
||||
description = ''
|
||||
Whether grub should be build against libzfs.
|
||||
ZFS support is only available for GRUB v2.
|
||||
This option is ignored for GRUB v1.
|
||||
'';
|
||||
};
|
||||
|
||||
efiSupport = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether grub should be build with EFI support.
|
||||
EFI support is only available for GRUB v2.
|
||||
This option is ignored for GRUB v1.
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -269,7 +293,7 @@ in
|
|||
if cfg.devices == [] then
|
||||
throw "You must set the option ‘boot.loader.grub.device’ to make the system bootable."
|
||||
else
|
||||
"PERL5LIB=${makePerlPath (with pkgs.perlPackages; [ FileSlurp XMLLibXML XMLSAX ])} " +
|
||||
"PERL5LIB=${makePerlPath (with pkgs.perlPackages; [ FileSlurp XMLLibXML XMLSAX ListCompare ])} " +
|
||||
(if cfg.enableCryptodisk then "GRUB_ENABLE_CRYPTODISK=y " else "") +
|
||||
"${pkgs.perl}/bin/perl ${./install-grub.pl} ${grubConfig}";
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ use File::Path;
|
|||
use File::stat;
|
||||
use File::Copy;
|
||||
use File::Slurp;
|
||||
require List::Compare;
|
||||
use POSIX;
|
||||
use Cwd;
|
||||
|
||||
|
@ -39,6 +40,7 @@ sub runCommand {
|
|||
|
||||
my $grub = get("grub");
|
||||
my $grubVersion = int(get("version"));
|
||||
my $grubTarget = get("grubTarget");
|
||||
my $extraConfig = get("extraConfig");
|
||||
my $extraPrepareConfig = get("extraPrepareConfig");
|
||||
my $extraPerEntryConfig = get("extraPerEntryConfig");
|
||||
|
@ -50,6 +52,10 @@ my $copyKernels = get("copyKernels") eq "true";
|
|||
my $timeout = int(get("timeout"));
|
||||
my $defaultEntry = int(get("default"));
|
||||
my $fsIdentifier = get("fsIdentifier");
|
||||
my $grubEfi = get("grubEfi");
|
||||
my $grubTargetEfi = get("grubTargetEfi");
|
||||
my $canTouchEfiVariables = get("canTouchEfiVariables");
|
||||
my $efiSysMountPoint = get("efiSysMountPoint");
|
||||
$ENV{'PATH'} = get("path");
|
||||
|
||||
die "unsupported GRUB version\n" if $grubVersion != 1 && $grubVersion != 2;
|
||||
|
@ -103,6 +109,8 @@ sub GetFs {
|
|||
|
||||
# Skip the read-only bind-mount on /nix/store.
|
||||
next if $mountPoint eq "/nix/store" && (grep { $_ eq "rw" } @superOptions) && (grep { $_ eq "ro" } @mountOptions);
|
||||
# Skip mount point generated by systemd-efi-boot-generator?
|
||||
next if $fsType eq "autofs";
|
||||
|
||||
# Ensure this matches the intended directory
|
||||
next unless PathInMount($dir, $mountPoint);
|
||||
|
@ -402,16 +410,114 @@ foreach my $fn (glob "/boot/kernels/*") {
|
|||
}
|
||||
|
||||
|
||||
# Install GRUB if the version changed from the last time we installed
|
||||
# it. FIXME: shouldn't we reinstall if ‘devices’ changed?
|
||||
my $prevVersion = readFile("/boot/grub/version") // "";
|
||||
if (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1" || get("fullVersion") ne $prevVersion) {
|
||||
#
|
||||
# Install GRUB if the parameters changed from the last time we installed it.
|
||||
#
|
||||
|
||||
struct(GrubState => {
|
||||
version => '$',
|
||||
efi => '$',
|
||||
devices => '$',
|
||||
efiMountPoint => '$',
|
||||
});
|
||||
sub readGrubState {
|
||||
my $defaultGrubState = GrubState->new(version => "", efi => "", devices => "", efiMountPoint => "" );
|
||||
open FILE, "</boot/grub/state" or return $defaultGrubState;
|
||||
local $/ = "\n";
|
||||
my $version = <FILE>;
|
||||
chomp($version);
|
||||
my $efi = <FILE>;
|
||||
chomp($efi);
|
||||
my $devices = <FILE>;
|
||||
chomp($devices);
|
||||
my $efiMountPoint = <FILE>;
|
||||
chomp($efiMountPoint);
|
||||
close FILE;
|
||||
my $grubState = GrubState->new(version => $version, efi => $efi, devices => $devices, efiMountPoint => $efiMountPoint );
|
||||
return $grubState
|
||||
}
|
||||
|
||||
sub getDeviceTargets {
|
||||
my @devices = ();
|
||||
foreach my $dev ($dom->findnodes('/expr/attrs/attr[@name = "devices"]/list/string/@value')) {
|
||||
$dev = $dev->findvalue(".") or die;
|
||||
push(@devices, $dev);
|
||||
}
|
||||
return @devices;
|
||||
}
|
||||
|
||||
# check whether to install GRUB EFI or not
|
||||
sub getEfiTarget {
|
||||
if (($grub ne "") && ($grubEfi ne "")) {
|
||||
# EFI can only be installed when target is set;
|
||||
# A target is also required then for non-EFI grub
|
||||
if (($grubTarget eq "") || ($grubTargetEfi eq "")) { die }
|
||||
else { return "both" }
|
||||
} elsif (($grub ne "") && ($grubEfi eq "")) {
|
||||
# TODO: It would be safer to disallow non-EFI grub installation if no taget is given.
|
||||
# If no target is given, then grub auto-detects the target which can lead to errors.
|
||||
# E.g. it seems as if grub would auto-detect a EFI target based on the availability
|
||||
# of a EFI partition.
|
||||
# However, it seems as auto-detection is currently relied on for non-x86_64 and non-i386
|
||||
# architectures in NixOS. That would have to be fixed in the nixos modules first.
|
||||
return "no"
|
||||
} elsif (($grub eq "") && ($grubEfi ne "")) {
|
||||
# EFI can only be installed when target is set;
|
||||
if ($grubTargetEfi eq "") { die }
|
||||
else {return "only" }
|
||||
} else {
|
||||
# at least one grub target has to be given
|
||||
die
|
||||
}
|
||||
}
|
||||
|
||||
my @deviceTargets = getDeviceTargets();
|
||||
my $efiTarget = getEfiTarget();
|
||||
my $prevGrubState = readGrubState();
|
||||
my @prevDeviceTargets = split/:/, $prevGrubState->devices;
|
||||
|
||||
my $devicesDiffer = scalar (List::Compare->new( '-u', '-a', \@deviceTargets, \@prevDeviceTargets)->get_symmetric_difference() );
|
||||
my $versionDiffer = (get("fullVersion") eq \$prevGrubState->version);
|
||||
my $efiDiffer = ($efiTarget eq \$prevGrubState->efi);
|
||||
my $efiMountPointDiffer = ($efiSysMountPoint eq \$prevGrubState->efiMountPoint);
|
||||
my $requireNewInstall = $devicesDiffer || $versionDiffer || $efiDiffer || $efiMountPointDiffer || (($ENV{'NIXOS_INSTALL_GRUB'} // "") eq "1");
|
||||
|
||||
|
||||
# install non-EFI GRUB
|
||||
if (($requireNewInstall != 0) && ($efiTarget eq "no" || $efiTarget eq "both")) {
|
||||
foreach my $dev (@deviceTargets) {
|
||||
next if $dev eq "nodev";
|
||||
print STDERR "installing the GRUB $grubVersion boot loader on $dev...\n";
|
||||
system("$grub/sbin/grub-install", "--recheck", Cwd::abs_path($dev)) == 0
|
||||
or die "$0: installation of GRUB on $dev failed\n";
|
||||
if ($grubTarget eq "") {
|
||||
system("$grub/sbin/grub-install", "--recheck", Cwd::abs_path($dev)) == 0
|
||||
or die "$0: installation of GRUB on $dev failed\n";
|
||||
} else {
|
||||
system("$grub/sbin/grub-install", "--recheck", "--target=$grubTarget", Cwd::abs_path($dev)) == 0
|
||||
or die "$0: installation of GRUB on $dev failed\n";
|
||||
}
|
||||
}
|
||||
writeFile("/boot/grub/version", get("fullVersion"));
|
||||
}
|
||||
|
||||
|
||||
# install EFI GRUB
|
||||
if (($requireNewInstall != 0) && ($efiTarget eq "only" || $efiTarget eq "both")) {
|
||||
print STDERR "installing the GRUB $grubVersion EFI boot loader into $efiSysMountPoint...\n";
|
||||
if ($canTouchEfiVariables eq "true") {
|
||||
system("$grubEfi/sbin/grub-install", "--recheck", "--target=$grubTargetEfi", "--efi-directory=$efiSysMountPoint") == 0
|
||||
or die "$0: installation of GRUB EFI into $efiSysMountPoint failed\n";
|
||||
} else {
|
||||
system("$grubEfi/sbin/grub-install", "--recheck", "--target=$grubTargetEfi", "--efi-directory=$efiSysMountPoint", "--no-nvram") == 0
|
||||
or die "$0: installation of GRUB EFI into $efiSysMountPoint failed\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# update GRUB state file
|
||||
if ($requireNewInstall != 0) {
|
||||
open FILE, ">/boot/grub/state" or die "cannot create /boot/grub/state: $!\n";
|
||||
print FILE get("fullVersion"), "\n" or die;
|
||||
print FILE $efiTarget, "\n" or die;
|
||||
print FILE join( ":", @deviceTargets ), "\n" or die;
|
||||
print FILE $efiSysMountPoint, "\n" or die;
|
||||
close FILE or die;
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ export LD_LIBRARY_PATH=@extraUtils@/lib
|
|||
export PATH=@extraUtils@/bin
|
||||
ln -s @extraUtils@/bin /bin
|
||||
|
||||
# Stop LVM complaining about fd3
|
||||
export LVM_SUPPRESS_FD_WARNINGS=true
|
||||
|
||||
fail() {
|
||||
if [ -n "$panicOnFail" ]; then exit 1; fi
|
||||
|
@ -347,7 +349,8 @@ while read -u 3 mountPoint; do
|
|||
# that we don't properly recognise.
|
||||
if test -z "$pseudoDevice" -a ! -e $device; then
|
||||
echo -n "waiting for device $device to appear..."
|
||||
for try in $(seq 1 20); do
|
||||
try=20
|
||||
while [ $try -gt 0 ]; do
|
||||
sleep 1
|
||||
# also re-try lvm activation now that new block devices might have appeared
|
||||
lvm vgchange -ay
|
||||
|
@ -355,8 +358,12 @@ while read -u 3 mountPoint; do
|
|||
udevadm trigger --action=add
|
||||
if test -e $device; then break; fi
|
||||
echo -n "."
|
||||
try=$((try - 1))
|
||||
done
|
||||
echo
|
||||
if [ $try -eq 0 ]; then
|
||||
echo "Timed out waiting for device $device, trying to mount anyway."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Wait once more for the udev queue to empty, just in case it's
|
||||
|
|
|
@ -1040,6 +1040,11 @@ in
|
|||
''
|
||||
# This file is created automatically and should not be modified.
|
||||
# Please change the option ‘systemd.tmpfiles.rules’ instead.
|
||||
|
||||
z /var/log/journal 2755 root systemd-journal - -
|
||||
z /var/log/journal/%m 2755 root systemd-journal - -
|
||||
z /var/log/journal/%m/* 0640 root systemd-journal - -
|
||||
|
||||
${concatStringsSep "\n" cfg.tmpfiles.rules}
|
||||
'';
|
||||
|
||||
|
|
|
@ -21,11 +21,12 @@ let
|
|||
|
||||
kernel = config.boot.kernelPackages;
|
||||
|
||||
splPkg = if cfgZfs.useGit then kernel.spl_git else kernel.spl;
|
||||
zfsPkg = if cfgZfs.useGit then kernel.zfs_git else kernel.zfs;
|
||||
splKernelPkg = if cfgZfs.useGit then kernel.spl_git else kernel.spl;
|
||||
zfsKernelPkg = if cfgZfs.useGit then kernel.zfs_git else kernel.zfs;
|
||||
zfsUserPkg = if cfgZfs.useGit then pkgs.zfs_git else pkgs.zfs;
|
||||
|
||||
autosnapPkg = pkgs.zfstools.override {
|
||||
zfs = zfsPkg;
|
||||
zfs = zfsUserPkg;
|
||||
};
|
||||
|
||||
zfsAutoSnap = "${autosnapPkg}/bin/zfs-auto-snapshot";
|
||||
|
@ -195,17 +196,17 @@ in
|
|||
|
||||
boot = {
|
||||
kernelModules = [ "spl" "zfs" ] ;
|
||||
extraModulePackages = [ splPkg zfsPkg ];
|
||||
extraModulePackages = [ splKernelPkg zfsKernelPkg ];
|
||||
};
|
||||
|
||||
boot.initrd = mkIf inInitrd {
|
||||
kernelModules = [ "spl" "zfs" ];
|
||||
extraUtilsCommands =
|
||||
''
|
||||
cp -v ${zfsPkg}/sbin/zfs $out/bin
|
||||
cp -v ${zfsPkg}/sbin/zdb $out/bin
|
||||
cp -v ${zfsPkg}/sbin/zpool $out/bin
|
||||
cp -pdv ${zfsPkg}/lib/lib*.so* $out/lib
|
||||
cp -v ${zfsUserPkg}/sbin/zfs $out/bin
|
||||
cp -v ${zfsUserPkg}/sbin/zdb $out/bin
|
||||
cp -v ${zfsUserPkg}/sbin/zpool $out/bin
|
||||
cp -pdv ${zfsUserPkg}/lib/lib*.so* $out/lib
|
||||
cp -pdv ${pkgs.zlib}/lib/lib*.so* $out/lib
|
||||
'';
|
||||
postDeviceCommands = concatStringsSep "\n" ([''
|
||||
|
@ -228,12 +229,12 @@ in
|
|||
zfsSupport = true;
|
||||
};
|
||||
|
||||
environment.etc."zfs/zed.d".source = "${zfsPkg}/etc/zfs/zed.d/*";
|
||||
environment.etc."zfs/zed.d".source = "${zfsUserPkg}/etc/zfs/zed.d/*";
|
||||
|
||||
system.fsPackages = [ zfsPkg ]; # XXX: needed? zfs doesn't have (need) a fsck
|
||||
environment.systemPackages = [ zfsPkg ];
|
||||
services.udev.packages = [ zfsPkg ]; # to hook zvol naming, etc.
|
||||
systemd.packages = [ zfsPkg ];
|
||||
system.fsPackages = [ zfsUserPkg ]; # XXX: needed? zfs doesn't have (need) a fsck
|
||||
environment.systemPackages = [ zfsUserPkg ];
|
||||
services.udev.packages = [ zfsUserPkg ]; # to hook zvol naming, etc.
|
||||
systemd.packages = [ zfsUserPkg ];
|
||||
|
||||
systemd.services = let
|
||||
getPoolFilesystems = pool:
|
||||
|
@ -260,7 +261,7 @@ in
|
|||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
zpool_cmd="${zfsPkg}/sbin/zpool"
|
||||
zpool_cmd="${zfsUserPkg}/sbin/zpool"
|
||||
("$zpool_cmd" list "${pool}" >/dev/null) || "$zpool_cmd" import -N ${optionalString cfgZfs.forceImportAll "-f"} "${pool}"
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -300,6 +300,7 @@ in rec {
|
|||
tests.nfs3 = callTest tests/nfs.nix { version = 3; };
|
||||
tests.nsd = callTest tests/nsd.nix {};
|
||||
tests.openssh = callTest tests/openssh.nix {};
|
||||
tests.panamax = scrubDrv (import tests/panamax.nix { system = "x86_64-linux"; });
|
||||
tests.peerflix = callTest tests/peerflix.nix {};
|
||||
tests.printing = callTest tests/printing.nix {};
|
||||
tests.proxy = callTest tests/proxy.nix {};
|
||||
|
|
|
@ -17,7 +17,7 @@ import ./make-test.nix {
|
|||
|
||||
users.extraUsers.jenkins.extraGroups = [ "users" ];
|
||||
|
||||
systemd.services.jenkins.serviceConfig.TimeoutStartSec = "3min";
|
||||
systemd.services.jenkins.serviceConfig.TimeoutStartSec = "6min";
|
||||
};
|
||||
|
||||
slave =
|
||||
|
|
18
nixos/tests/panamax.nix
Normal file
18
nixos/tests/panamax.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
import ./make-test.nix {
|
||||
name = "panamax";
|
||||
|
||||
machine = { config, pkgs, ... }: {
|
||||
services.panamax.enable = true;
|
||||
};
|
||||
|
||||
testScript =
|
||||
''
|
||||
startAll;
|
||||
$machine->waitForUnit("panamax-api.service");
|
||||
$machine->waitForUnit("panamax-ui.service");
|
||||
$machine->waitForOpenPort(3000);
|
||||
$machine->waitForOpenPort(8888);
|
||||
$machine->succeed("curl --fail http://localhost:8888/ > /dev/null");
|
||||
$machine->shutdown;
|
||||
'';
|
||||
}
|
|
@ -1,23 +1,44 @@
|
|||
{ stdenv, fetchurl, ncurses, curl, taglib, fftw, mpd_clientlib, pkgconfig
|
||||
, libiconvOrEmpty, boost, readline }:
|
||||
{ stdenv, fetchurl, boost, mpd_clientlib, ncurses, pkgconfig, readline
|
||||
, libiconvOrEmpty
|
||||
, outputsSupport ? false # outputs screen
|
||||
, visualizerSupport ? false, fftw ? null # visualizer screen
|
||||
, clockSupport ? false # clock screen
|
||||
, unicodeSupport ? true # utf8 support
|
||||
, curlSupport ? true, curl ? null # allow fetching lyrics from the internet
|
||||
, taglibSupport ? true, taglib ? null # tag editor
|
||||
}:
|
||||
|
||||
assert visualizerSupport -> (fftw != null);
|
||||
assert curlSupport -> (curl != null);
|
||||
assert taglibSupport -> (taglib != null);
|
||||
|
||||
with stdenv.lib;
|
||||
stdenv.mkDerivation rec {
|
||||
version = "0.6.2";
|
||||
name = "ncmpcpp-${version}";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://ncmpcpp.rybczak.net/stable/ncmpcpp-${version}.tar.bz2";
|
||||
url = "http://ncmpcpp.rybczak.net/stable/${name}.tar.bz2";
|
||||
sha256 = "1mrd6m6ph0fscxp9x96ipxh6ai7w0n1miapcfqrqfy058qx5zbck";
|
||||
};
|
||||
|
||||
configureFlags = "BOOST_LIB_SUFFIX=";
|
||||
configureFlags = [ "BOOST_LIB_SUFFIX=" ]
|
||||
++ optional outputsSupport "--enable-outputs"
|
||||
++ optional visualizerSupport "--enable-visualizer --with-fftw"
|
||||
++ optional clockSupport "--enable-clock"
|
||||
++ optional unicodeSupport "--enable-unicode"
|
||||
++ optional curlSupport "--with-curl"
|
||||
++ optional taglibSupport "--with-taglib";
|
||||
|
||||
buildInputs = [ ncurses curl taglib fftw mpd_clientlib boost pkgconfig readline ]
|
||||
buildInputs = [ boost mpd_clientlib ncurses pkgconfig readline ]
|
||||
++ optional curlSupport curl
|
||||
++ optional visualizerSupport fftw
|
||||
++ optional taglibSupport taglib
|
||||
++ libiconvOrEmpty;
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Curses-based interface for MPD (music player daemon)";
|
||||
homepage = http://unkart.ovh.org/ncmpcpp/;
|
||||
meta = {
|
||||
description = "A featureful ncurses based MPD client inspired by ncmpc";
|
||||
homepage = http://ncmpcpp.rybczak.net/;
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ lovek323 mornfall koral ];
|
||||
platforms = platforms.all;
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
, pyqt4, mutagen, python-libdiscid
|
||||
}:
|
||||
|
||||
let version = "1.3"; in
|
||||
let version = "1.3.2"; in
|
||||
buildPythonPackage {
|
||||
name = "picard-${version}";
|
||||
namePrefix = "";
|
||||
|
||||
src = fetchurl {
|
||||
url = "ftp://ftp.musicbrainz.org/pub/musicbrainz/picard/picard-${version}.tar.gz";
|
||||
sha256 = "06s90w1j29qhd931dgj752k5v4pjbvxiz6g0613xzj3ms8zsrlys";
|
||||
url = "http://ftp.musicbrainz.org/pub/musicbrainz/picard/picard-${version}.tar.gz";
|
||||
sha256 = "0821xb7gyg0rhch8s3qkzmak90wjpcxkv9a364yv6bmqc12j6a77";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{stdenv, fetchurl, intltool, pkgconfig , gtk, libxml2
|
||||
{ stdenv, fetchurl, intltool, pkgconfig , gtk, libxml2
|
||||
, enchant, gucharmap, python
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "bluefish-2.2.6";
|
||||
name = "bluefish-2.2.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/bluefish/${name}.tar.bz2";
|
||||
sha256 = "05j2mv6s2llf2pxknddhk8fzbghr7yff58xhkxy2icky64n8khjl";
|
||||
sha256 = "1psqx3ljz13ylqs4zkaxv9lv1hgzld6904kdp0alwx99p5rlnlr3";
|
||||
};
|
||||
|
||||
buildInputs = [intltool pkgconfig gtk libxml2
|
||||
enchant gucharmap python];
|
||||
buildInputs = [ intltool pkgconfig gtk libxml2
|
||||
enchant gucharmap python ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A powerful editor targeted towards programmers and webdevelopers";
|
||||
|
|
|
@ -5,6 +5,10 @@ source $stdenv/setup
|
|||
# *our* versions, not the ones found in the system, as it would do by default.
|
||||
# On other platforms, this appears to be unnecessary.
|
||||
preConfigure() {
|
||||
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
|
||||
substituteInPlace $i --replace /bin/pwd pwd
|
||||
done
|
||||
|
||||
case "${system}" in
|
||||
x86_64-linux) glibclibdir=lib64 ;;
|
||||
i686-linux) glibclibdir=lib ;;
|
||||
|
@ -23,7 +27,9 @@ preConfigure() {
|
|||
--replace /usr/lib/crti.o $libc/${glibclibdir}/crti.o \
|
||||
--replace /usr/lib/crtn.o $libc/${glibclibdir}/crtn.o
|
||||
done
|
||||
}
|
||||
|
||||
preInstall () {
|
||||
for i in Makefile.in ./src/Makefile.in ./lib-src/Makefile.in ./leim/Makefile.in; do
|
||||
substituteInPlace $i --replace /bin/pwd pwd
|
||||
done
|
||||
|
|
|
@ -28,6 +28,9 @@ stdenv.mkDerivation rec {
|
|||
'';
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace Makefile.in --replace "/bin/pwd" "pwd"
|
||||
substituteInPlace lib-src/Makefile.in --replace "/bin/pwd" "pwd"
|
||||
|
||||
patch -p0 < patch-mac
|
||||
|
||||
# The search for 'tputs' will fail because it's in ncursesw within the
|
||||
|
|
|
@ -220,7 +220,7 @@ in
|
|||
description = "C/C++ IDE. New. Intelligent. Cross-platform.";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "http://download.jetbrains.com/cpp/${name}-${build}.tar.gz";
|
||||
url = "https://download.jetbrains.com/cpp/${name}-${build}.tar.gz";
|
||||
sha256 = "1hpsq37hq61id836wg5j6l3xapln6qdkqa10r3ig2p1rs2hq7i9y";
|
||||
};
|
||||
};
|
||||
|
@ -232,7 +232,7 @@ in
|
|||
description = "Integrated Development Environment (IDE) by Jetbrains, community edition";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "http://download-ln.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
||||
url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz";
|
||||
sha256 = "01wcpzdahkh3li2l3k2bgirnlp7hdxk9y1kyrxc3d9d1nazq8wqn";
|
||||
};
|
||||
};
|
||||
|
@ -244,7 +244,7 @@ in
|
|||
description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "http://download-ln.jetbrains.com/idea/ideaIU-${version}.tar.gz";
|
||||
url = "https://download.jetbrains.com/idea/ideaIU-${version}.tar.gz";
|
||||
sha256 = "1zkqigdh9l1f3mjjvxsp7b7vc93v5ylvxa1dfpclzmfbzna7h69s";
|
||||
};
|
||||
};
|
||||
|
@ -256,7 +256,7 @@ in
|
|||
description = "The Most Intelligent Ruby and Rails IDE";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "http://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
||||
url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz";
|
||||
sha256 = "0xsx44gaddarkw5k4yjidzwkayf2xvsxklfzdnzcck4rg4vyk4v4";
|
||||
};
|
||||
};
|
||||
|
@ -268,7 +268,7 @@ in
|
|||
description = "PyCharm 4.0 Community Edition";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
src = fetchurl {
|
||||
url = "http://download.jetbrains.com/python/${name}.tar.gz";
|
||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||
sha256 = "0jh0sxi5dpgpw7ga018fby7zvb4i9k49vwl8422lfcrgckdz9nv2";
|
||||
};
|
||||
};
|
||||
|
@ -280,7 +280,7 @@ in
|
|||
description = "PyCharm 4.0 Professional Edition";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "http://download.jetbrains.com/python/${name}.tar.gz";
|
||||
url = "https://download.jetbrains.com/python/${name}.tar.gz";
|
||||
sha256 = "04yjhg6vi2kz00sy8zg4wkz26ai90vbp0cnd850ynsab0jsy24w4";
|
||||
};
|
||||
};
|
||||
|
@ -292,7 +292,7 @@ in
|
|||
description = "Professional IDE for Web and PHP developers";
|
||||
license = stdenv.lib.licenses.unfree;
|
||||
src = fetchurl {
|
||||
url = "http://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
|
||||
url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz";
|
||||
sha256 = "01b8vx6swi71sd0rc7i1jnicilqp11ch3zrm8gwb6xh1pmmpdirf";
|
||||
};
|
||||
};
|
||||
|
|
|
@ -2,15 +2,13 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
namePrefix = "";
|
||||
name = "mcomix-1.00";
|
||||
name = "mcomix-1.01";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/mcomix/${name}.tar.bz2";
|
||||
sha256 = "1phcdx1agacdadz8bvbibdbps1apz8idi668zmkky5cpl84k2ifq";
|
||||
sha256 = "0k3pqbvk08kb1nr0qldaj9bc7ca6rvcycgfi2n7gqmsirq5kscys";
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
pythonPath = [ pygtk pil python27Packages.sqlite3 ];
|
||||
|
||||
meta = {
|
||||
|
|
|
@ -4,14 +4,14 @@
|
|||
}:
|
||||
|
||||
let
|
||||
version = "0.64.2";
|
||||
version = "0.64.3";
|
||||
|
||||
ETL = stdenv.mkDerivation rec {
|
||||
name = "ETL-0.04.17";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/synfig/${name}.tar.gz";
|
||||
sha256 = "1i2m31y5hdwr365z3zmfh5p3zm4ga4l4yqrl1qrmjryqqzkw200l";
|
||||
sha256 = "0rb9czkgan41q6xlck97kh77g176vjm1wnq620sqky7k2hiahr3s";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -20,7 +20,7 @@ let
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/synfig/synfig-${version}.tar.gz";
|
||||
sha256 = "04mx321z929ngl65hfc1hv5jw37wqbh8y2avmpvajagvn6lp3zdl";
|
||||
sha256 = "0p4wqjidb4k3viahck4wzbh777f5ifpivn4vxhxs5fbq8nsvqksh";
|
||||
};
|
||||
|
||||
configureFlags = [
|
||||
|
@ -41,7 +41,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/synfig/${name}.tar.gz";
|
||||
sha256 = "13hw4z6yx70g4mnjmvmxkk7b1qzlwmqjhxflq5dd6cqdsmfw9mc7";
|
||||
sha256 = "1li3ac8qvg25h9fgym0zywnq5bg3sgbv162xs4c6pwksn75i6gsv";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "calibre-2.18.0";
|
||||
name = "calibre-2.19.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/calibre/${name}.tar.xz";
|
||||
sha256 = "05n7kfih4mbhnvpzi5i821jl0na66si2ygz8cql931p2qcfhnixx";
|
||||
sha256 = "1acj1i8hlbi99jjgcs9dl9ap7951m1p460srmkdyjmlljw1qhcbn";
|
||||
};
|
||||
|
||||
inherit python;
|
||||
|
|
|
@ -1,15 +1,24 @@
|
|||
{ stdenv, fetchurl, cmake, pkgconfig, gtk, vte, pixman, gettext, perl }:
|
||||
{ stdenv, fetchurl, cmake, pkgconfig, gtk3, perl, vte }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sakura-${version}";
|
||||
version = "2.4.2";
|
||||
version = "3.2.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://launchpad.net/sakura/trunk/${version}/+download/${name}.tar.bz2";
|
||||
sha256 = "1mpsjsk7dgz56h7yagd9aq0d92vj59yrz4ri6za3mfmglhn29rn5";
|
||||
sha256 = "1pfvc35kckrzik5wx8ywhkhclr52rfp2syg46ix2nsdm72q6dl90";
|
||||
};
|
||||
buildInputs = [ cmake pkgconfig gtk vte pixman gettext perl ];
|
||||
meta = {
|
||||
homepage = "http://www.pleyades.net/david/sakura.php";
|
||||
|
||||
nativeBuildInputs = [ cmake perl pkgconfig ];
|
||||
|
||||
buildInputs = [ gtk3 vte ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A terminal emulator based on GTK and VTE";
|
||||
homepage = http://www.pleyades.net/david/projects/sakura;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ astsmtl codyopel ];
|
||||
platforms = platforms.linux;
|
||||
longDescription = ''
|
||||
sakura is a terminal emulator based on GTK and VTE. It's a terminal
|
||||
emulator with few dependencies, so you don't need a full GNOME desktop
|
||||
|
@ -20,8 +29,5 @@ stdenv.mkDerivation rec {
|
|||
terminals in one window and adds a contextual menu with some basic
|
||||
options. No more no less.
|
||||
'';
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = with stdenv.lib.maintainers; [ astsmtl ];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "taskwarrior-${version}";
|
||||
version = "2.3.0";
|
||||
version = "2.4.0";
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.taskwarrior.org/download/task-${version}.tar.gz";
|
||||
sha256 = "0wxcfq0n96vmcbwrlk2x377k8cc5k4i64ca6p02y74g6168ji6ib";
|
||||
sha256 = "17hiv7zld06zb5xmyp96bw9xl6vp178fhffs660fxxpxn3srb9bg";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake libuuid gnutls ];
|
||||
|
|
|
@ -63,8 +63,6 @@ stdenv.mkDerivation {
|
|||
rm -rf "$out/tools/gyp" # XXX: Don't even copy it in the first place.
|
||||
'';
|
||||
|
||||
preferLocalBuild = true;
|
||||
|
||||
passthru = {
|
||||
inherit version channel;
|
||||
plugins = fetchurl binary;
|
||||
|
|
55
pkgs/applications/networking/browsers/luakit/default.nix
Normal file
55
pkgs/applications/networking/browsers/luakit/default.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{ stdenv , fetchurl , git , glib_networking , gsettings_desktop_schemas , gtk,
|
||||
help2man , libunique , lua5 , luafilesystem , luajit , luasqlite3, makeWrapper,
|
||||
pkgconfig , sqlite , webkit }:
|
||||
|
||||
let
|
||||
lualibs = [ luafilesystem luasqlite3 ];
|
||||
getPath = lib : type : "${lib}/lib/lua/${lua5.luaversion}/?.${type};${lib}/share/lua/${lua5.luaversion}/?.${type}";
|
||||
getLuaPath = lib : getPath lib "lua";
|
||||
getLuaCPath = lib : getPath lib "so";
|
||||
luaPath = stdenv.lib.concatStringsSep ";" (map getLuaPath lualibs);
|
||||
luaCPath = stdenv.lib.concatStringsSep ";" (map getLuaCPath lualibs);
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
|
||||
name = "luakit-2012.09.13";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Fast, small, webkit based browser framework extensible in Lua";
|
||||
homepage = "http://luakit.org";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ matthiasbeyer ];
|
||||
platforms = platforms.linux; # I only tested linux
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/mason-larobina/luakit/archive/2012.09.13-r1.tar.gz";
|
||||
sha256 = "067g3bp5w20jypc8rx54dpbn3ysbgxzchgpq7sld5yh2z36s1l52";
|
||||
};
|
||||
|
||||
buildInputs = [ git gsettings_desktop_schemas gtk help2man libunique lua5
|
||||
luafilesystem luajit luasqlite3 makeWrapper pkgconfig sqlite webkit ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e "s/DESTDIR/INSTALLDIR/" ./Makefile
|
||||
sed -i -e "s|/etc/xdg/luakit/|$out/etc/xdg/luakit/|" lib/lousy/util.lua
|
||||
patchShebangs ./build-utils
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
make DEVELOPMENT_PATHS=0 USE_LUAJIT=1 INSTALLDIR=$out DESTDIR=$out PREFIX=$out USE_GTK3=1
|
||||
'';
|
||||
|
||||
installPhase = let
|
||||
luaKitPath = "$out/share/luakit/lib/?/init.lua;$out/share/luakit/lib/?.lua";
|
||||
in ''
|
||||
make DEVELOPMENT_PATHS=0 INSTALLDIR=$out DESTDIR=$out PREFIX=$out USE_GTK3=1 install
|
||||
wrapProgram $out/bin/luakit \
|
||||
--prefix GIO_EXTRA_MODULES : "${glib_networking}/lib/gio/modules" \
|
||||
--prefix XDG_DATA_DIRS : "${gsettings_desktop_schemas}/share:$out/usr/share/:$out/share/:$GSETTINGS_SCHEMAS_PATH" \
|
||||
--prefix XDG_CONFIG_DIRS : "$out/etc/xdg" \
|
||||
--set LUA_PATH '"${luaKitPath};${luaPath};"' \
|
||||
--set LUA_CPATH '"${luaCPath};"'
|
||||
'';
|
||||
|
||||
}
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
let
|
||||
# -> http://get.adobe.com/flashplayer/
|
||||
version = "11.2.202.440";
|
||||
version = "11.2.202.442";
|
||||
|
||||
src =
|
||||
if stdenv.system == "x86_64-linux" then
|
||||
|
@ -47,7 +47,7 @@ let
|
|||
else rec {
|
||||
inherit version;
|
||||
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.x86_64.tar.gz";
|
||||
sha256 = "1sx17b7w3za274r0jxb80qn3m3hvij6faka45say3a60ps8bihc4";
|
||||
sha256 = "08ni1mllp98d7wawz35lx8ydymya8nspb90mq29ivbyrkx5aal28";
|
||||
}
|
||||
else if stdenv.system == "i686-linux" then
|
||||
if debug then
|
||||
|
@ -60,7 +60,7 @@ let
|
|||
else rec {
|
||||
inherit version;
|
||||
url = "http://fpdownload.macromedia.com/get/flashplayer/pdc/${version}/install_flash_player_11_linux.i386.tar.gz";
|
||||
sha256 = "1qn8sg1kk61cv7vrwn6l5sb1mmczfcas1b85cq2mzzjg4af7wcf4";
|
||||
sha256 = "00728q8jp40llpsfw2n5q9w29isyy3a64xlisjizyh3chb6bkkdm";
|
||||
}
|
||||
else throw "Flash Player is not supported on this platform";
|
||||
|
||||
|
|
23
pkgs/applications/networking/cluster/panamax/Gemfile-api
Normal file
23
pkgs/applications/networking/cluster/panamax/Gemfile-api
Normal file
|
@ -0,0 +1,23 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rails', '4.1.7'
|
||||
gem 'puma', '2.8.2'
|
||||
gem 'sqlite3', '1.3.9'
|
||||
gem 'faraday_middleware', '0.9.0'
|
||||
gem 'docker-api', '1.13.0', require: 'docker'
|
||||
gem 'fleet-api', '0.6.0', require: 'fleet'
|
||||
gem 'active_model_serializers', '0.9.0'
|
||||
gem 'octokit', '3.2.0'
|
||||
gem 'kmts', '2.0.1'
|
||||
|
||||
group :test, :development do
|
||||
gem 'rspec-rails'
|
||||
gem 'its'
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem 'coveralls', '0.7.0'
|
||||
gem 'shoulda-matchers', '2.6.1'
|
||||
gem 'database_cleaner', '1.3.0'
|
||||
gem 'webmock', '1.20.0'
|
||||
end
|
164
pkgs/applications/networking/cluster/panamax/Gemfile-api.lock
Normal file
164
pkgs/applications/networking/cluster/panamax/Gemfile-api.lock
Normal file
|
@ -0,0 +1,164 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actionmailer (4.1.7)
|
||||
actionpack (= 4.1.7)
|
||||
actionview (= 4.1.7)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
actionpack (4.1.7)
|
||||
actionview (= 4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
rack (~> 1.5.2)
|
||||
rack-test (~> 0.6.2)
|
||||
actionview (4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
builder (~> 3.1)
|
||||
erubis (~> 2.7.0)
|
||||
active_model_serializers (0.9.0)
|
||||
activemodel (>= 3.2)
|
||||
activemodel (4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
builder (~> 3.1)
|
||||
activerecord (4.1.7)
|
||||
activemodel (= 4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
arel (~> 5.0.0)
|
||||
activesupport (4.1.7)
|
||||
i18n (~> 0.6, >= 0.6.9)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.3.6)
|
||||
archive-tar-minitar (0.5.2)
|
||||
arel (5.0.1.20140414130214)
|
||||
builder (3.2.2)
|
||||
coveralls (0.7.0)
|
||||
multi_json (~> 1.3)
|
||||
rest-client
|
||||
simplecov (>= 0.7)
|
||||
term-ansicolor
|
||||
thor
|
||||
crack (0.4.2)
|
||||
safe_yaml (~> 1.0.0)
|
||||
database_cleaner (1.3.0)
|
||||
diff-lcs (1.2.5)
|
||||
docile (1.1.5)
|
||||
docker-api (1.13.0)
|
||||
archive-tar-minitar
|
||||
excon (>= 0.37.0)
|
||||
json
|
||||
erubis (2.7.0)
|
||||
excon (0.37.0)
|
||||
faraday (0.8.9)
|
||||
multipart-post (~> 1.2.0)
|
||||
faraday_middleware (0.9.0)
|
||||
faraday (>= 0.7.4, < 0.9)
|
||||
fleet-api (0.6.0)
|
||||
faraday (= 0.8.9)
|
||||
faraday_middleware (= 0.9.0)
|
||||
hike (1.2.3)
|
||||
i18n (0.6.11)
|
||||
its (0.2.0)
|
||||
rspec-core
|
||||
json (1.8.1)
|
||||
kmts (2.0.1)
|
||||
mail (2.6.3)
|
||||
mime-types (>= 1.16, < 3)
|
||||
mime-types (2.4.3)
|
||||
minitest (5.4.3)
|
||||
multi_json (1.10.1)
|
||||
multipart-post (1.2.0)
|
||||
octokit (3.2.0)
|
||||
sawyer (~> 0.5.3)
|
||||
puma (2.8.2)
|
||||
rack (>= 1.1, < 2.0)
|
||||
rack (1.5.2)
|
||||
rack-test (0.6.2)
|
||||
rack (>= 1.0)
|
||||
rails (4.1.7)
|
||||
actionmailer (= 4.1.7)
|
||||
actionpack (= 4.1.7)
|
||||
actionview (= 4.1.7)
|
||||
activemodel (= 4.1.7)
|
||||
activerecord (= 4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
bundler (>= 1.3.0, < 2.0)
|
||||
railties (= 4.1.7)
|
||||
sprockets-rails (~> 2.0)
|
||||
railties (4.1.7)
|
||||
actionpack (= 4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rake (10.4.0)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
rspec-core (3.1.7)
|
||||
rspec-support (~> 3.1.0)
|
||||
rspec-expectations (3.1.2)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.1.0)
|
||||
rspec-mocks (3.1.3)
|
||||
rspec-support (~> 3.1.0)
|
||||
rspec-rails (3.1.0)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
rspec-core (~> 3.1.0)
|
||||
rspec-expectations (~> 3.1.0)
|
||||
rspec-mocks (~> 3.1.0)
|
||||
rspec-support (~> 3.1.0)
|
||||
rspec-support (3.1.2)
|
||||
safe_yaml (1.0.4)
|
||||
sawyer (0.5.4)
|
||||
addressable (~> 2.3.5)
|
||||
faraday (~> 0.8, < 0.10)
|
||||
shoulda-matchers (2.6.1)
|
||||
activesupport (>= 3.0.0)
|
||||
simplecov (0.9.1)
|
||||
docile (~> 1.1.0)
|
||||
multi_json (~> 1.0)
|
||||
simplecov-html (~> 0.8.0)
|
||||
simplecov-html (0.8.0)
|
||||
sprockets (2.12.3)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-rails (2.2.0)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
sqlite3 (1.3.9)
|
||||
term-ansicolor (1.3.0)
|
||||
tins (~> 1.0)
|
||||
thor (0.19.1)
|
||||
thread_safe (0.3.4)
|
||||
tilt (1.4.1)
|
||||
tins (1.3.0)
|
||||
tzinfo (1.2.2)
|
||||
thread_safe (~> 0.1)
|
||||
webmock (1.20.0)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
active_model_serializers (= 0.9.0)
|
||||
coveralls (= 0.7.0)
|
||||
database_cleaner (= 1.3.0)
|
||||
docker-api (= 1.13.0)
|
||||
faraday_middleware (= 0.9.0)
|
||||
fleet-api (= 0.6.0)
|
||||
its
|
||||
kmts (= 2.0.1)
|
||||
octokit (= 3.2.0)
|
||||
puma (= 2.8.2)
|
||||
rails (= 4.1.7)
|
||||
rspec-rails
|
||||
shoulda-matchers (= 2.6.1)
|
||||
sqlite3 (= 1.3.9)
|
||||
webmock (= 1.20.0)
|
30
pkgs/applications/networking/cluster/panamax/Gemfile-ui
Normal file
30
pkgs/applications/networking/cluster/panamax/Gemfile-ui
Normal file
|
@ -0,0 +1,30 @@
|
|||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rails', '4.1.7'
|
||||
gem 'puma', '2.8.2'
|
||||
gem 'sass', '3.3.9'
|
||||
gem 'therubyracer', '0.12.1', platforms: :ruby
|
||||
gem 'haml', '4.0.5'
|
||||
gem 'uglifier', '2.5.1'
|
||||
gem 'ctl_base_ui'
|
||||
gem 'activeresource', '4.0.0'
|
||||
gem 'kramdown', '1.4.0'
|
||||
gem 'zeroclipboard-rails'
|
||||
|
||||
|
||||
group :test, :development do
|
||||
gem 'rspec-rails', '2.14.2'
|
||||
gem 'capybara', '2.3.0'
|
||||
gem 'teaspoon', '0.8.0'
|
||||
gem 'phantomjs', '1.9.7.1'
|
||||
gem 'dotenv-rails', '0.11.1'
|
||||
gem 'pry'
|
||||
gem 'pry-byebug'
|
||||
gem 'pry-stack_explorer'
|
||||
end
|
||||
|
||||
group :test do
|
||||
gem 'webmock', '1.18.0'
|
||||
gem 'sinatra', '1.4.5'
|
||||
gem 'coveralls', '0.7.0'
|
||||
end
|
217
pkgs/applications/networking/cluster/panamax/Gemfile-ui.lock
Normal file
217
pkgs/applications/networking/cluster/panamax/Gemfile-ui.lock
Normal file
|
@ -0,0 +1,217 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
actionmailer (4.1.7)
|
||||
actionpack (= 4.1.7)
|
||||
actionview (= 4.1.7)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
actionpack (4.1.7)
|
||||
actionview (= 4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
rack (~> 1.5.2)
|
||||
rack-test (~> 0.6.2)
|
||||
actionview (4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
builder (~> 3.1)
|
||||
erubis (~> 2.7.0)
|
||||
activemodel (4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
builder (~> 3.1)
|
||||
activerecord (4.1.7)
|
||||
activemodel (= 4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
arel (~> 5.0.0)
|
||||
activeresource (4.0.0)
|
||||
activemodel (~> 4.0)
|
||||
activesupport (~> 4.0)
|
||||
rails-observers (~> 0.1.1)
|
||||
activesupport (4.1.7)
|
||||
i18n (~> 0.6, >= 0.6.9)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
minitest (~> 5.1)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.3.6)
|
||||
arel (5.0.1.20140414130214)
|
||||
binding_of_caller (0.7.2)
|
||||
debug_inspector (>= 0.0.1)
|
||||
builder (3.2.2)
|
||||
byebug (3.5.1)
|
||||
columnize (~> 0.8)
|
||||
debugger-linecache (~> 1.2)
|
||||
slop (~> 3.6)
|
||||
capybara (2.3.0)
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (~> 2.0)
|
||||
coderay (1.1.0)
|
||||
columnize (0.8.9)
|
||||
coveralls (0.7.0)
|
||||
multi_json (~> 1.3)
|
||||
rest-client
|
||||
simplecov (>= 0.7)
|
||||
term-ansicolor
|
||||
thor
|
||||
crack (0.4.2)
|
||||
safe_yaml (~> 1.0.0)
|
||||
ctl_base_ui (0.0.4)
|
||||
haml (~> 4.0)
|
||||
jquery-rails (~> 3.1)
|
||||
jquery-ui-rails (~> 4.2)
|
||||
rails (~> 4.1)
|
||||
sass (~> 3.3)
|
||||
debug_inspector (0.0.2)
|
||||
debugger-linecache (1.2.0)
|
||||
diff-lcs (1.2.5)
|
||||
docile (1.1.5)
|
||||
dotenv (0.11.1)
|
||||
dotenv-deployment (~> 0.0.2)
|
||||
dotenv-deployment (0.0.2)
|
||||
dotenv-rails (0.11.1)
|
||||
dotenv (= 0.11.1)
|
||||
erubis (2.7.0)
|
||||
execjs (2.2.1)
|
||||
haml (4.0.5)
|
||||
tilt
|
||||
hike (1.2.3)
|
||||
i18n (0.6.11)
|
||||
jquery-rails (3.1.2)
|
||||
railties (>= 3.0, < 5.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
jquery-ui-rails (4.2.1)
|
||||
railties (>= 3.2.16)
|
||||
json (1.8.1)
|
||||
kramdown (1.4.0)
|
||||
libv8 (3.16.14.7)
|
||||
mail (2.6.3)
|
||||
mime-types (>= 1.16, < 3)
|
||||
method_source (0.8.2)
|
||||
mime-types (2.4.3)
|
||||
mini_portile (0.6.0)
|
||||
minitest (5.4.3)
|
||||
multi_json (1.10.1)
|
||||
nokogiri (1.6.2.1)
|
||||
mini_portile (= 0.6.0)
|
||||
phantomjs (1.9.7.1)
|
||||
pry (0.10.1)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.8.1)
|
||||
slop (~> 3.4)
|
||||
pry-byebug (2.0.0)
|
||||
byebug (~> 3.4)
|
||||
pry (~> 0.10)
|
||||
pry-stack_explorer (0.4.9.1)
|
||||
binding_of_caller (>= 0.7)
|
||||
pry (>= 0.9.11)
|
||||
puma (2.8.2)
|
||||
rack (>= 1.1, < 2.0)
|
||||
rack (1.5.2)
|
||||
rack-protection (1.5.3)
|
||||
rack
|
||||
rack-test (0.6.2)
|
||||
rack (>= 1.0)
|
||||
rails (4.1.7)
|
||||
actionmailer (= 4.1.7)
|
||||
actionpack (= 4.1.7)
|
||||
actionview (= 4.1.7)
|
||||
activemodel (= 4.1.7)
|
||||
activerecord (= 4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
bundler (>= 1.3.0, < 2.0)
|
||||
railties (= 4.1.7)
|
||||
sprockets-rails (~> 2.0)
|
||||
rails-observers (0.1.2)
|
||||
activemodel (~> 4.0)
|
||||
railties (4.1.7)
|
||||
actionpack (= 4.1.7)
|
||||
activesupport (= 4.1.7)
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rake (10.4.1)
|
||||
ref (1.0.5)
|
||||
rest-client (1.6.7)
|
||||
mime-types (>= 1.16)
|
||||
rspec-core (2.14.8)
|
||||
rspec-expectations (2.14.5)
|
||||
diff-lcs (>= 1.1.3, < 2.0)
|
||||
rspec-mocks (2.14.6)
|
||||
rspec-rails (2.14.2)
|
||||
actionpack (>= 3.0)
|
||||
activemodel (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
rspec-core (~> 2.14.0)
|
||||
rspec-expectations (~> 2.14.0)
|
||||
rspec-mocks (~> 2.14.0)
|
||||
safe_yaml (1.0.3)
|
||||
sass (3.3.9)
|
||||
simplecov (0.9.1)
|
||||
docile (~> 1.1.0)
|
||||
multi_json (~> 1.0)
|
||||
simplecov-html (~> 0.8.0)
|
||||
simplecov-html (0.8.0)
|
||||
sinatra (1.4.5)
|
||||
rack (~> 1.4)
|
||||
rack-protection (~> 1.4)
|
||||
tilt (~> 1.3, >= 1.3.4)
|
||||
slop (3.6.0)
|
||||
sprockets (2.12.3)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-rails (2.2.2)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
teaspoon (0.8.0)
|
||||
railties (>= 3.2.5, < 5)
|
||||
term-ansicolor (1.3.0)
|
||||
tins (~> 1.0)
|
||||
therubyracer (0.12.1)
|
||||
libv8 (~> 3.16.14.0)
|
||||
ref
|
||||
thor (0.19.1)
|
||||
thread_safe (0.3.4)
|
||||
tilt (1.4.1)
|
||||
tins (1.1.0)
|
||||
tzinfo (1.2.2)
|
||||
thread_safe (~> 0.1)
|
||||
uglifier (2.5.1)
|
||||
execjs (>= 0.3.0)
|
||||
json (>= 1.8.0)
|
||||
webmock (1.18.0)
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
xpath (2.0.0)
|
||||
nokogiri (~> 1.3)
|
||||
zeroclipboard-rails (0.1.0)
|
||||
railties (>= 3.1)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
activeresource (= 4.0.0)
|
||||
capybara (= 2.3.0)
|
||||
coveralls (= 0.7.0)
|
||||
ctl_base_ui
|
||||
dotenv-rails (= 0.11.1)
|
||||
haml (= 4.0.5)
|
||||
kramdown (= 1.4.0)
|
||||
phantomjs (= 1.9.7.1)
|
||||
pry
|
||||
pry-byebug
|
||||
pry-stack_explorer
|
||||
puma (= 2.8.2)
|
||||
rails (= 4.1.7)
|
||||
rspec-rails (= 2.14.2)
|
||||
sass (= 3.3.9)
|
||||
sinatra (= 1.4.5)
|
||||
teaspoon (= 0.8.0)
|
||||
therubyracer (= 0.12.1)
|
||||
uglifier (= 2.5.1)
|
||||
webmock (= 1.18.0)
|
||||
zeroclipboard-rails
|
75
pkgs/applications/networking/cluster/panamax/api.nix
Normal file
75
pkgs/applications/networking/cluster/panamax/api.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{ stdenv, buildEnv, fetchgit, fetchurl, makeWrapper, bundlerEnv, bundler_HEAD
|
||||
, ruby, libxslt, libxml2, sqlite, openssl, cacert, docker
|
||||
, dataDir ? "/var/lib/panamax-api" }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
database_yml = builtins.toFile "database.yml" ''
|
||||
production:
|
||||
adapter: sqlite3
|
||||
database: <%= ENV["PANAMAX_DATABASE_PATH"] || "${dataDir}/db/mnt/db.sqlite3" %>
|
||||
timeout: 5000
|
||||
'';
|
||||
env = bundlerEnv {
|
||||
name = "panamax-api-gems";
|
||||
inherit ruby;
|
||||
gemset = ./gemset-api.nix;
|
||||
gemfile = ./Gemfile-api;
|
||||
lockfile = ./Gemfile-api.lock;
|
||||
};
|
||||
bundler = bundler_HEAD.override { inherit ruby; };
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "panamax-api-${version}";
|
||||
version = "0.2.11";
|
||||
|
||||
src = fetchgit {
|
||||
rev = "refs/tags/v${version}";
|
||||
url = "git://github.com/CenturyLinkLabs/panamax-api";
|
||||
sha256 = "01sz7jibn1rqfga85pr4p8wk6jfldzfaxj1726vs6znmcwhfkcgj";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper sqlite openssl env.ruby bundler ];
|
||||
|
||||
setSourceRoot = ''
|
||||
mkdir -p $out/share
|
||||
cp -R panamax-api $out/share/panamax-api
|
||||
export sourceRoot="$out/share/panamax-api"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
find . -type f -exec sed -e 's|/usr/bin/docker|${docker}/bin/docker|g' -i "{}" \;
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
export HOME=$PWD
|
||||
export GEM_HOME=${env}/${env.ruby.gemPath}
|
||||
export RAILS_ENV=production
|
||||
|
||||
ln -sf ${database_yml} config/database.yml
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
rm -rf log tmp
|
||||
mv ./db ./_db
|
||||
ln -sf ${dataDir}/{db,state/log,state/tmp} .
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper bin/bundle "$out/bin/bundle" \
|
||||
--run "cd $out/share/panamax-api" \
|
||||
--prefix "PATH" : "$out/share/panamax-api/bin:${env.ruby}/bin:$PATH" \
|
||||
--prefix "HOME" : "$out/share/panamax-api" \
|
||||
--prefix "GEM_HOME" : "${env}/${env.ruby.gemPath}" \
|
||||
--prefix "OPENSSL_X509_CERT_FILE" : "${cacert}/etc/ca-bundle.crt" \
|
||||
--prefix "SSL_CERT_FILE" : "${cacert}/etc/ca-bundle.crt" \
|
||||
--prefix "GEM_PATH" : "$out/share/panamax-api:${bundler}/${env.ruby.gemPath}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/CenturyLinkLabs/panamax-api;
|
||||
description = "The API behind The Panamax UI";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ matejc offline ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
571
pkgs/applications/networking/cluster/panamax/gemset-api.nix
Normal file
571
pkgs/applications/networking/cluster/panamax/gemset-api.nix
Normal file
|
@ -0,0 +1,571 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> { };
|
||||
in {
|
||||
"actionmailer" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0qjv5akjbpgd4cx518k522mssvc3y3nki65hi6fj5nbzi7a6rwq5";
|
||||
};
|
||||
dependencies = [
|
||||
"actionpack"
|
||||
"actionview"
|
||||
"mail"
|
||||
];
|
||||
};
|
||||
"actionpack" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "07y1ny00h69xklq260smyl5md052f617gqrzkyw5sxafs5z25zax";
|
||||
};
|
||||
dependencies = [
|
||||
"actionview"
|
||||
"activesupport"
|
||||
"rack"
|
||||
"rack-test"
|
||||
];
|
||||
};
|
||||
"actionview" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "06sp37gfpn2jn7j6vlpp1y6vfi5kig60vyvixrjhyz0g4vgm13ax";
|
||||
};
|
||||
dependencies = [
|
||||
"activesupport"
|
||||
"builder"
|
||||
"erubis"
|
||||
];
|
||||
};
|
||||
"active_model_serializers" = {
|
||||
version = "0.9.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1ws3gx3wwlm17w7k0agwzmcmww6627lvqaqm828lzm3g1xqilkkl";
|
||||
};
|
||||
dependencies = [
|
||||
"activemodel"
|
||||
];
|
||||
};
|
||||
"activemodel" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0rlqzz25l7vsphgkilg80kmk20d9h357awi27ax6zzb9klkqh0jr";
|
||||
};
|
||||
dependencies = [
|
||||
"activesupport"
|
||||
"builder"
|
||||
];
|
||||
};
|
||||
"activerecord" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0j4r0m32mjbwmz9gs8brln35jzr1cn7h585ggj0w0f1ai4hjsby5";
|
||||
};
|
||||
dependencies = [
|
||||
"activemodel"
|
||||
"activesupport"
|
||||
"arel"
|
||||
];
|
||||
};
|
||||
"activesupport" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "13i3mz66d5kp5y39gjwmcfqv0wb6mxm5k1nnz40wvd38dsf7n3bs";
|
||||
};
|
||||
dependencies = [
|
||||
"i18n"
|
||||
"json"
|
||||
"minitest"
|
||||
"thread_safe"
|
||||
"tzinfo"
|
||||
];
|
||||
};
|
||||
"addressable" = {
|
||||
version = "2.3.6";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "137fj0whmn1kvaq8wjalp8x4qbblwzvg3g4bfx8d8lfi6f0w48p8";
|
||||
};
|
||||
};
|
||||
"archive-tar-minitar" = {
|
||||
version = "0.5.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1j666713r3cc3wb0042x0wcmq2v11vwwy5pcaayy5f0lnd26iqig";
|
||||
};
|
||||
};
|
||||
"arel" = {
|
||||
version = "5.0.1.20140414130214";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0dhnc20h1v8ml3nmkxq92rr7qxxpk6ixhwvwhgl2dbw9mmxz0hf9";
|
||||
};
|
||||
};
|
||||
"builder" = {
|
||||
version = "3.2.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "14fii7ab8qszrvsvhz6z2z3i4dw0h41a62fjr2h1j8m41vbrmyv2";
|
||||
};
|
||||
};
|
||||
"coveralls" = {
|
||||
version = "0.7.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0sz30d7b83qqsj3i0fr691w05d62wj7x3afh0ryjkqkis3fq94j4";
|
||||
};
|
||||
dependencies = [
|
||||
"multi_json"
|
||||
"rest-client"
|
||||
"simplecov"
|
||||
"term-ansicolor"
|
||||
"thor"
|
||||
];
|
||||
};
|
||||
"crack" = {
|
||||
version = "0.4.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1il94m92sz32nw5i6hdq14f1a2c3s9hza9zn6l95fvqhabq38k7a";
|
||||
};
|
||||
dependencies = [
|
||||
"safe_yaml"
|
||||
];
|
||||
};
|
||||
"database_cleaner" = {
|
||||
version = "1.3.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "19w25yda684pg29bggq26wy4lpyjvzscwg2hx3hmmmpysiwfnxgn";
|
||||
};
|
||||
};
|
||||
"diff-lcs" = {
|
||||
version = "1.2.5";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1vf9civd41bnqi6brr5d9jifdw73j9khc6fkhfl1f8r9cpkdvlx1";
|
||||
};
|
||||
};
|
||||
"docile" = {
|
||||
version = "1.1.5";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx";
|
||||
};
|
||||
};
|
||||
"docker-api" = {
|
||||
version = "1.13.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1rara27gn7lxaf12dqkx8s1clssg10jndfcy4wz2fv6ms1i1lnp6";
|
||||
};
|
||||
dependencies = [
|
||||
"archive-tar-minitar"
|
||||
"excon"
|
||||
"json"
|
||||
];
|
||||
};
|
||||
"erubis" = {
|
||||
version = "2.7.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3";
|
||||
};
|
||||
};
|
||||
"excon" = {
|
||||
version = "0.37.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "05x7asmsq5m419n1lhzk9bic02gwng4cqmrcqsfnd6kmkwm8csv2";
|
||||
};
|
||||
};
|
||||
"faraday" = {
|
||||
version = "0.8.9";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "17d79fsgx0xwh0mfxyz5pbr435qlw79phlfvifc546w2axdkp718";
|
||||
};
|
||||
dependencies = [
|
||||
"multipart-post"
|
||||
];
|
||||
};
|
||||
"faraday_middleware" = {
|
||||
version = "0.9.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1kwvi2sdxd6j764a7q5iir73dw2v6816zx3l8cgfv0wr2m47icq2";
|
||||
};
|
||||
dependencies = [
|
||||
"faraday"
|
||||
];
|
||||
};
|
||||
"fleet-api" = {
|
||||
version = "0.6.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0136mzc0fxp6mzh38n6xbg87cw9g9vq1nrlr3ylazbflvmlxgan6";
|
||||
};
|
||||
dependencies = [
|
||||
"faraday"
|
||||
"faraday_middleware"
|
||||
];
|
||||
};
|
||||
"hike" = {
|
||||
version = "1.2.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0i6c9hrszzg3gn2j41v3ijnwcm8cc2931fnjiv6mnpl4jcjjykhm";
|
||||
};
|
||||
};
|
||||
"i18n" = {
|
||||
version = "0.6.11";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0fwjlgmgry2blf8zlxn9c555cf4a16p287l599kz5104ncjxlzdk";
|
||||
};
|
||||
};
|
||||
"its" = {
|
||||
version = "0.2.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0rxwds9ipqp48mzqcaxzmfcqhawazg0zlhc1avv3i2cmm3np1z8g";
|
||||
};
|
||||
dependencies = [
|
||||
"rspec-core"
|
||||
];
|
||||
};
|
||||
"json" = {
|
||||
version = "1.8.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0002bsycvizvkmk1jyv8px1hskk6wrjfk4f7x5byi8gxm6zzn6wn";
|
||||
};
|
||||
};
|
||||
"kmts" = {
|
||||
version = "2.0.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1wk680q443lg35a25am6i8xawf16iqg5xnq1m8xd2gib4dsy1d8v";
|
||||
};
|
||||
};
|
||||
"mail" = {
|
||||
version = "2.6.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1nbg60h3cpnys45h7zydxwrl200p7ksvmrbxnwwbpaaf9vnf3znp";
|
||||
};
|
||||
dependencies = [
|
||||
"mime-types"
|
||||
];
|
||||
};
|
||||
"mime-types" = {
|
||||
version = "2.4.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "16nissnb31wj7kpcaynx4gr67i7pbkzccfg8k7xmplbkla4rmwiq";
|
||||
};
|
||||
};
|
||||
"minitest" = {
|
||||
version = "5.4.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1ws2cphg9jh45nrvs43s2ww5r14nb026bwlbwwpi0jz6qsqm86x4";
|
||||
};
|
||||
};
|
||||
"multi_json" = {
|
||||
version = "1.10.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1ll21dz01jjiplr846n1c8yzb45kj5hcixgb72rz0zg8fyc9g61c";
|
||||
};
|
||||
};
|
||||
"multipart-post" = {
|
||||
version = "1.2.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "12p7lnmc52di1r4h73h6xrpppplzyyhani9p7wm8l4kgf1hnmwnc";
|
||||
};
|
||||
};
|
||||
"octokit" = {
|
||||
version = "3.2.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "07ll3x1hv72zssb4hkdw56xg3xk6x4fch4yf38zljvbh388r11ng";
|
||||
};
|
||||
dependencies = [
|
||||
"sawyer"
|
||||
];
|
||||
};
|
||||
"puma" = {
|
||||
version = "2.8.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1l57fmf8vyxfjv7ab5znq0k339cym5ghnm5xxfvd1simjp73db0k";
|
||||
};
|
||||
dependencies = [
|
||||
"rack"
|
||||
];
|
||||
buildInputs = [ pkgs.openssl ];
|
||||
};
|
||||
"rack" = {
|
||||
version = "1.5.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "19szfw76cscrzjldvw30jp3461zl00w4xvw1x9lsmyp86h1g0jp6";
|
||||
};
|
||||
};
|
||||
"rack-test" = {
|
||||
version = "0.6.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "01mk715ab5qnqf6va8k3hjsvsmplrfqpz6g58qw4m3l8mim0p4ky";
|
||||
};
|
||||
dependencies = [
|
||||
"rack"
|
||||
];
|
||||
};
|
||||
"rails" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "059mpljplmhfz8rr4hk40q67fllcpsy809m4mwwbkm8qwif2z5r0";
|
||||
};
|
||||
dependencies = [
|
||||
"actionmailer"
|
||||
"actionpack"
|
||||
"actionview"
|
||||
"activemodel"
|
||||
"activerecord"
|
||||
"activesupport"
|
||||
"railties"
|
||||
"sprockets-rails"
|
||||
];
|
||||
};
|
||||
"railties" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1n08h0rgj0aq5lvslnih6lvqz9wadpz6nnb25i4qhp37fhhyz9yz";
|
||||
};
|
||||
dependencies = [
|
||||
"actionpack"
|
||||
"activesupport"
|
||||
"rake"
|
||||
"thor"
|
||||
];
|
||||
};
|
||||
"rake" = {
|
||||
version = "10.4.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0a10xzqc1lh6gjkajkslr0n40wjrniyiyzxkp9m5fc8wf7b74zw8";
|
||||
};
|
||||
};
|
||||
"rest-client" = {
|
||||
version = "1.6.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0nn7zalgidz2yj0iqh3xvzh626krm2al79dfiij19jdhp0rk8853";
|
||||
};
|
||||
dependencies = [
|
||||
"mime-types"
|
||||
];
|
||||
};
|
||||
"rspec-core" = {
|
||||
version = "3.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "01bawvln663gffljwzpq3mrpa061cghjbvfbq15jvhmip3csxqc9";
|
||||
};
|
||||
dependencies = [
|
||||
"rspec-support"
|
||||
];
|
||||
};
|
||||
"rspec-expectations" = {
|
||||
version = "3.1.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0m8d36wng1lpbcs54zhg1rxh63rgj345k3p0h0c06lgknz339nzh";
|
||||
};
|
||||
dependencies = [
|
||||
"diff-lcs"
|
||||
"rspec-support"
|
||||
];
|
||||
};
|
||||
"rspec-mocks" = {
|
||||
version = "3.1.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0gxk5w3klia4zsnp0svxck43xxwwfdqvhr3srv6p30f3m5q6rmzr";
|
||||
};
|
||||
dependencies = [
|
||||
"rspec-support"
|
||||
];
|
||||
};
|
||||
"rspec-rails" = {
|
||||
version = "3.1.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1b1in3n1dc1bpf9wb3p3b2ynq05iacmr48jxzc73lj4g44ksh3wq";
|
||||
};
|
||||
dependencies = [
|
||||
"actionpack"
|
||||
"activesupport"
|
||||
"railties"
|
||||
"rspec-core"
|
||||
"rspec-expectations"
|
||||
"rspec-mocks"
|
||||
"rspec-support"
|
||||
];
|
||||
};
|
||||
"rspec-support" = {
|
||||
version = "3.1.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "14y6v9r9lrh91ry9r79h85v0f3y9ja25w42nv5z9n0bipfcwhprb";
|
||||
};
|
||||
};
|
||||
"safe_yaml" = {
|
||||
version = "1.0.4";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1hly915584hyi9q9vgd968x2nsi5yag9jyf5kq60lwzi5scr7094";
|
||||
};
|
||||
};
|
||||
"sawyer" = {
|
||||
version = "0.5.4";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "01kl4zpf0gaacnkra5nikrzfpwj8f10hsvgyzm7z2s1mz4iipx2v";
|
||||
};
|
||||
dependencies = [
|
||||
"addressable"
|
||||
"faraday"
|
||||
];
|
||||
};
|
||||
"shoulda-matchers" = {
|
||||
version = "2.6.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1p3jhvd4dsj6d7nbmvnqhqhpmb8pnr05pi7jv9ajwqcys8140mc1";
|
||||
};
|
||||
dependencies = [
|
||||
"activesupport"
|
||||
];
|
||||
};
|
||||
"simplecov" = {
|
||||
version = "0.9.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "06hylxlalaxxldpbaqa54gc52wxdff0fixdvjyzr6i4ygxwzr7yf";
|
||||
};
|
||||
dependencies = [
|
||||
"docile"
|
||||
"multi_json"
|
||||
"simplecov-html"
|
||||
];
|
||||
};
|
||||
"simplecov-html" = {
|
||||
version = "0.8.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0jhn3jql73x7hsr00wwv984iyrcg0xhf64s90zaqv2f26blkqfb9";
|
||||
};
|
||||
};
|
||||
"sprockets" = {
|
||||
version = "2.12.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1bn2drr8bc2af359dkfraq0nm0p1pib634kvhwn5lvj3r4vllnn2";
|
||||
};
|
||||
dependencies = [
|
||||
"hike"
|
||||
"multi_json"
|
||||
"rack"
|
||||
"tilt"
|
||||
];
|
||||
};
|
||||
"sprockets-rails" = {
|
||||
version = "2.2.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "042fxqskvaa0wn9kpy02nv6p7sa355py9pi58zw96l30170sd3hl";
|
||||
};
|
||||
dependencies = [
|
||||
"actionpack"
|
||||
"activesupport"
|
||||
"sprockets"
|
||||
];
|
||||
};
|
||||
"sqlite3" = {
|
||||
version = "1.3.9";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "07m6a6flmyyi0rkg0j7x1a9861zngwjnximfh95cli2zzd57914r";
|
||||
};
|
||||
};
|
||||
"term-ansicolor" = {
|
||||
version = "1.3.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1a2gw7gmpmx57sdpyhjwl0zn4bqp7jyjz7aslpvvphd075layp4b";
|
||||
};
|
||||
dependencies = [
|
||||
"tins"
|
||||
];
|
||||
};
|
||||
"thor" = {
|
||||
version = "0.19.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "08p5gx18yrbnwc6xc0mxvsfaxzgy2y9i78xq7ds0qmdm67q39y4z";
|
||||
};
|
||||
};
|
||||
"thread_safe" = {
|
||||
version = "0.3.4";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1cil2zcdzqkyr8zrwhlg7gywryg36j4mxlxw0h0x0j0wjym5nc8n";
|
||||
};
|
||||
};
|
||||
"tilt" = {
|
||||
version = "1.4.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "00sr3yy7sbqaq7cb2d2kpycajxqf1b1wr1yy33z4bnzmqii0b0ir";
|
||||
};
|
||||
};
|
||||
"tins" = {
|
||||
version = "1.3.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1yxa5kyp9mw4w866wlg7c32ingzqxnzh3ir9yf06pwpkmq3mrbdi";
|
||||
};
|
||||
};
|
||||
"tzinfo" = {
|
||||
version = "1.2.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1c01p3kg6xvy1cgjnzdfq45fggbwish8krd0h864jvbpybyx7cgx";
|
||||
};
|
||||
dependencies = [
|
||||
"thread_safe"
|
||||
];
|
||||
};
|
||||
"webmock" = {
|
||||
version = "1.20.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0bl5v0xzcj24lx7xpsnywv3liqnqb5lfxysmmfb2fgi0n8586i6m";
|
||||
};
|
||||
dependencies = [
|
||||
"addressable"
|
||||
"crack"
|
||||
];
|
||||
};
|
||||
}
|
760
pkgs/applications/networking/cluster/panamax/gemset-ui.nix
Normal file
760
pkgs/applications/networking/cluster/panamax/gemset-ui.nix
Normal file
|
@ -0,0 +1,760 @@
|
|||
let
|
||||
pkgs = import <nixpkgs> { };
|
||||
in {
|
||||
"actionmailer" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0qjv5akjbpgd4cx518k522mssvc3y3nki65hi6fj5nbzi7a6rwq5";
|
||||
};
|
||||
dependencies = [
|
||||
"actionpack"
|
||||
"actionview"
|
||||
"mail"
|
||||
];
|
||||
};
|
||||
"actionpack" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "07y1ny00h69xklq260smyl5md052f617gqrzkyw5sxafs5z25zax";
|
||||
};
|
||||
dependencies = [
|
||||
"actionview"
|
||||
"activesupport"
|
||||
"rack"
|
||||
"rack-test"
|
||||
];
|
||||
};
|
||||
"actionview" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "06sp37gfpn2jn7j6vlpp1y6vfi5kig60vyvixrjhyz0g4vgm13ax";
|
||||
};
|
||||
dependencies = [
|
||||
"activesupport"
|
||||
"builder"
|
||||
"erubis"
|
||||
];
|
||||
};
|
||||
"activemodel" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0rlqzz25l7vsphgkilg80kmk20d9h357awi27ax6zzb9klkqh0jr";
|
||||
};
|
||||
dependencies = [
|
||||
"activesupport"
|
||||
"builder"
|
||||
];
|
||||
};
|
||||
"activerecord" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0j4r0m32mjbwmz9gs8brln35jzr1cn7h585ggj0w0f1ai4hjsby5";
|
||||
};
|
||||
dependencies = [
|
||||
"activemodel"
|
||||
"activesupport"
|
||||
"arel"
|
||||
];
|
||||
};
|
||||
"activeresource" = {
|
||||
version = "4.0.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0fc5igjijyjzsl9q5kybkdzhc92zv8wsv0ifb0y90i632jx6d4jq";
|
||||
};
|
||||
dependencies = [
|
||||
"activemodel"
|
||||
"activesupport"
|
||||
"rails-observers"
|
||||
];
|
||||
};
|
||||
"activesupport" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "13i3mz66d5kp5y39gjwmcfqv0wb6mxm5k1nnz40wvd38dsf7n3bs";
|
||||
};
|
||||
dependencies = [
|
||||
"i18n"
|
||||
"json"
|
||||
"minitest"
|
||||
"thread_safe"
|
||||
"tzinfo"
|
||||
];
|
||||
};
|
||||
"addressable" = {
|
||||
version = "2.3.6";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "137fj0whmn1kvaq8wjalp8x4qbblwzvg3g4bfx8d8lfi6f0w48p8";
|
||||
};
|
||||
};
|
||||
"arel" = {
|
||||
version = "5.0.1.20140414130214";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0dhnc20h1v8ml3nmkxq92rr7qxxpk6ixhwvwhgl2dbw9mmxz0hf9";
|
||||
};
|
||||
};
|
||||
"binding_of_caller" = {
|
||||
version = "0.7.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "15jg6dkaq2nzcd602d7ppqbdxw3aji961942w93crs6qw4n6h9yk";
|
||||
};
|
||||
dependencies = [
|
||||
"debug_inspector"
|
||||
];
|
||||
};
|
||||
"builder" = {
|
||||
version = "3.2.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "14fii7ab8qszrvsvhz6z2z3i4dw0h41a62fjr2h1j8m41vbrmyv2";
|
||||
};
|
||||
};
|
||||
"byebug" = {
|
||||
version = "3.5.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0ldc2r0b316rrn2fgdgiznskj9gb0q9n60243laq7nqw9na8wdan";
|
||||
};
|
||||
dependencies = [
|
||||
"columnize"
|
||||
"debugger-linecache"
|
||||
"slop"
|
||||
];
|
||||
};
|
||||
"capybara" = {
|
||||
version = "2.3.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "12x24zsn3y7sigmz45ijd9bkq7l14r2a00ay6k9mdgrbncbr3ins";
|
||||
};
|
||||
dependencies = [
|
||||
"mime-types"
|
||||
"nokogiri"
|
||||
"rack"
|
||||
"rack-test"
|
||||
"xpath"
|
||||
];
|
||||
};
|
||||
"coderay" = {
|
||||
version = "1.1.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "059wkzlap2jlkhg460pkwc1ay4v4clsmg1bp4vfzjzkgwdckr52s";
|
||||
};
|
||||
};
|
||||
"columnize" = {
|
||||
version = "0.8.9";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1f3azq8pvdaaclljanwhab78hdw40k908ma2cwk59qzj4hvf7mip";
|
||||
};
|
||||
};
|
||||
"coveralls" = {
|
||||
version = "0.7.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0sz30d7b83qqsj3i0fr691w05d62wj7x3afh0ryjkqkis3fq94j4";
|
||||
};
|
||||
dependencies = [
|
||||
"multi_json"
|
||||
"rest-client"
|
||||
"simplecov"
|
||||
"term-ansicolor"
|
||||
"thor"
|
||||
];
|
||||
};
|
||||
"crack" = {
|
||||
version = "0.4.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1il94m92sz32nw5i6hdq14f1a2c3s9hza9zn6l95fvqhabq38k7a";
|
||||
};
|
||||
dependencies = [
|
||||
"safe_yaml"
|
||||
];
|
||||
};
|
||||
"ctl_base_ui" = {
|
||||
version = "0.0.4";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0h0dbl0mf6cql7yp10jywv22rn0iy2188phdxvr2ladwwn2vxf5d";
|
||||
};
|
||||
dependencies = [
|
||||
"haml"
|
||||
"jquery-rails"
|
||||
"jquery-ui-rails"
|
||||
"rails"
|
||||
"sass"
|
||||
];
|
||||
};
|
||||
"debug_inspector" = {
|
||||
version = "0.0.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "109761g00dbrw5q0dfnbqg8blfm699z4jj70l4zrgf9mzn7ii50m";
|
||||
};
|
||||
};
|
||||
"debugger-linecache" = {
|
||||
version = "1.2.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0iwyx190fd5vfwj1gzr8pg3m374kqqix4g4fc4qw29sp54d3fpdz";
|
||||
};
|
||||
};
|
||||
"diff-lcs" = {
|
||||
version = "1.2.5";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1vf9civd41bnqi6brr5d9jifdw73j9khc6fkhfl1f8r9cpkdvlx1";
|
||||
};
|
||||
};
|
||||
"docile" = {
|
||||
version = "1.1.5";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0m8j31whq7bm5ljgmsrlfkiqvacrw6iz9wq10r3gwrv5785y8gjx";
|
||||
};
|
||||
};
|
||||
"dotenv" = {
|
||||
version = "0.11.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "09z0y0d6bks7i0sqvd8szfqj9i1kkj01anzly7shi83b3gxhrq9m";
|
||||
};
|
||||
dependencies = [
|
||||
"dotenv-deployment"
|
||||
];
|
||||
};
|
||||
"dotenv-deployment" = {
|
||||
version = "0.0.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1ad66jq9a09qq1js8wsyil97018s7y6x0vzji0dy34gh65sbjz8c";
|
||||
};
|
||||
};
|
||||
"dotenv-rails" = {
|
||||
version = "0.11.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0r6hif0i1lipbi7mkxx7wa5clsn65n6wyd9jry262cx396lsfrqy";
|
||||
};
|
||||
dependencies = [
|
||||
"dotenv"
|
||||
];
|
||||
};
|
||||
"erubis" = {
|
||||
version = "2.7.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1fj827xqjs91yqsydf0zmfyw9p4l2jz5yikg3mppz6d7fi8kyrb3";
|
||||
};
|
||||
};
|
||||
"execjs" = {
|
||||
version = "2.2.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1s41g9qwq0h4452q4gp934lnkzfkxh4wrg8fd4bcynba86bf3j8b";
|
||||
};
|
||||
};
|
||||
"haml" = {
|
||||
version = "4.0.5";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1xmzb0k5q271090crzmv7dbw8ss4289bzxklrc0fhw6pw3kcvc85";
|
||||
};
|
||||
dependencies = [
|
||||
"tilt"
|
||||
];
|
||||
};
|
||||
"hike" = {
|
||||
version = "1.2.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0i6c9hrszzg3gn2j41v3ijnwcm8cc2931fnjiv6mnpl4jcjjykhm";
|
||||
};
|
||||
};
|
||||
"i18n" = {
|
||||
version = "0.6.11";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0fwjlgmgry2blf8zlxn9c555cf4a16p287l599kz5104ncjxlzdk";
|
||||
};
|
||||
};
|
||||
"jquery-rails" = {
|
||||
version = "3.1.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0h5a565i3l2mbd221m6mz9d1nr53pz19i9qxv08qr1dv0yx2pr3y";
|
||||
};
|
||||
dependencies = [
|
||||
"railties"
|
||||
"thor"
|
||||
];
|
||||
};
|
||||
"jquery-ui-rails" = {
|
||||
version = "4.2.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1garrnqwh35acj2pp4sp6fpm2g881h23y644lzbic2qmcrq9wd2v";
|
||||
};
|
||||
dependencies = [
|
||||
"railties"
|
||||
];
|
||||
};
|
||||
"json" = {
|
||||
version = "1.8.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0002bsycvizvkmk1jyv8px1hskk6wrjfk4f7x5byi8gxm6zzn6wn";
|
||||
};
|
||||
};
|
||||
"kramdown" = {
|
||||
version = "1.4.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "001vy0ymiwbvkdbb9wpqmswv6imliv7xim00gq6rlk0chnbiaq80";
|
||||
};
|
||||
};
|
||||
"libv8" = {
|
||||
version = "3.16.14.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0dv5q5n5nf6b8h3fybwmsr3vkj70w4g1jpf6661j3hsv9vp0g4qq";
|
||||
};
|
||||
};
|
||||
"mail" = {
|
||||
version = "2.6.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1nbg60h3cpnys45h7zydxwrl200p7ksvmrbxnwwbpaaf9vnf3znp";
|
||||
};
|
||||
dependencies = [
|
||||
"mime-types"
|
||||
];
|
||||
};
|
||||
"method_source" = {
|
||||
version = "0.8.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1g5i4w0dmlhzd18dijlqw5gk27bv6dj2kziqzrzb7mpgxgsd1sf2";
|
||||
};
|
||||
};
|
||||
"mime-types" = {
|
||||
version = "2.4.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "16nissnb31wj7kpcaynx4gr67i7pbkzccfg8k7xmplbkla4rmwiq";
|
||||
};
|
||||
};
|
||||
"mini_portile" = {
|
||||
version = "0.6.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "09kcn4g63xrdirgwxgjikqg976rr723bkc9bxfr29pk22cj3wavn";
|
||||
};
|
||||
};
|
||||
"minitest" = {
|
||||
version = "5.4.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1ws2cphg9jh45nrvs43s2ww5r14nb026bwlbwwpi0jz6qsqm86x4";
|
||||
};
|
||||
};
|
||||
"multi_json" = {
|
||||
version = "1.10.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1ll21dz01jjiplr846n1c8yzb45kj5hcixgb72rz0zg8fyc9g61c";
|
||||
};
|
||||
};
|
||||
"nokogiri" = {
|
||||
version = "1.6.2.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0dj8ajm9hlfpa71qz1xn5prqy5qdi32ll74qh8ssjwknp1a35cnz";
|
||||
};
|
||||
dependencies = [
|
||||
"mini_portile"
|
||||
];
|
||||
};
|
||||
"phantomjs" = {
|
||||
version = "1.9.7.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "14as0yzwbzvshbp1f8igjxcdxc5vbjgh0jhdvy393il084inlrl7";
|
||||
};
|
||||
};
|
||||
"pry" = {
|
||||
version = "0.10.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1j0r5fm0wvdwzbh6d6apnp7c0n150hpm9zxpm5xvcgfqr36jaj8z";
|
||||
};
|
||||
dependencies = [
|
||||
"coderay"
|
||||
"method_source"
|
||||
"slop"
|
||||
];
|
||||
};
|
||||
"pry-byebug" = {
|
||||
version = "2.0.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "17b6720ci9345wkzj369ydyj6hdlg2krd26zivpd4dvaijszzgzq";
|
||||
};
|
||||
dependencies = [
|
||||
"byebug"
|
||||
"pry"
|
||||
];
|
||||
};
|
||||
"pry-stack_explorer" = {
|
||||
version = "0.4.9.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1828jqcfdr9nk86n15ky199vf33cfz51wkpv6kx230g0dsh9r85z";
|
||||
};
|
||||
dependencies = [
|
||||
"binding_of_caller"
|
||||
"pry"
|
||||
];
|
||||
};
|
||||
"puma" = {
|
||||
version = "2.8.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1l57fmf8vyxfjv7ab5znq0k339cym5ghnm5xxfvd1simjp73db0k";
|
||||
};
|
||||
dependencies = [
|
||||
"rack"
|
||||
];
|
||||
buildInputs = [ pkgs.openssl ];
|
||||
};
|
||||
"rack" = {
|
||||
version = "1.5.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "19szfw76cscrzjldvw30jp3461zl00w4xvw1x9lsmyp86h1g0jp6";
|
||||
};
|
||||
};
|
||||
"rack-protection" = {
|
||||
version = "1.5.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0cvb21zz7p9wy23wdav63z5qzfn4nialik22yqp6gihkgfqqrh5r";
|
||||
};
|
||||
dependencies = [
|
||||
"rack"
|
||||
];
|
||||
};
|
||||
"rack-test" = {
|
||||
version = "0.6.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "01mk715ab5qnqf6va8k3hjsvsmplrfqpz6g58qw4m3l8mim0p4ky";
|
||||
};
|
||||
dependencies = [
|
||||
"rack"
|
||||
];
|
||||
};
|
||||
"rails" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "059mpljplmhfz8rr4hk40q67fllcpsy809m4mwwbkm8qwif2z5r0";
|
||||
};
|
||||
dependencies = [
|
||||
"actionmailer"
|
||||
"actionpack"
|
||||
"actionview"
|
||||
"activemodel"
|
||||
"activerecord"
|
||||
"activesupport"
|
||||
"railties"
|
||||
"sprockets-rails"
|
||||
];
|
||||
};
|
||||
"rails-observers" = {
|
||||
version = "0.1.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1lsw19jzmvipvrfy2z04hi7r29dvkfc43h43vs67x6lsj9rxwwcy";
|
||||
};
|
||||
dependencies = [
|
||||
"activemodel"
|
||||
];
|
||||
};
|
||||
"railties" = {
|
||||
version = "4.1.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1n08h0rgj0aq5lvslnih6lvqz9wadpz6nnb25i4qhp37fhhyz9yz";
|
||||
};
|
||||
dependencies = [
|
||||
"actionpack"
|
||||
"activesupport"
|
||||
"rake"
|
||||
"thor"
|
||||
];
|
||||
};
|
||||
"rake" = {
|
||||
version = "10.4.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1446zzdpwpvwkd0zk19b2smmmvdiarh4b26cdbcw4fy5p67wxkw2";
|
||||
};
|
||||
};
|
||||
"ref" = {
|
||||
version = "1.0.5";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "19qgpsfszwc2sfh6wixgky5agn831qq8ap854i1jqqhy1zsci3la";
|
||||
};
|
||||
};
|
||||
"rest-client" = {
|
||||
version = "1.6.7";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0nn7zalgidz2yj0iqh3xvzh626krm2al79dfiij19jdhp0rk8853";
|
||||
};
|
||||
dependencies = [
|
||||
"mime-types"
|
||||
];
|
||||
};
|
||||
"rspec-core" = {
|
||||
version = "2.14.8";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0psjy5kdlz3ph39br0m01w65i1ikagnqlg39f8p65jh5q7dz8hwc";
|
||||
};
|
||||
};
|
||||
"rspec-expectations" = {
|
||||
version = "2.14.5";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1ni8kw8kjv76jvwjzi4jba00k3qzj9f8wd94vm6inz0jz3gwjqf9";
|
||||
};
|
||||
dependencies = [
|
||||
"diff-lcs"
|
||||
];
|
||||
};
|
||||
"rspec-mocks" = {
|
||||
version = "2.14.6";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1fwsmijd6w6cmqyh4ky2nq89jrpzh56hzmndx9wgkmdgfhfakv30";
|
||||
};
|
||||
};
|
||||
"rspec-rails" = {
|
||||
version = "2.14.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1j9nbha6p12kwy9c5g3lw541xg20yzk95lzgmsq7kvngiqz88p57";
|
||||
};
|
||||
dependencies = [
|
||||
"actionpack"
|
||||
"activemodel"
|
||||
"activesupport"
|
||||
"railties"
|
||||
"rspec-core"
|
||||
"rspec-expectations"
|
||||
"rspec-mocks"
|
||||
];
|
||||
};
|
||||
"safe_yaml" = {
|
||||
version = "1.0.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "063bykyk40s3rhy1dxfbvl69s179n1iny418z4wqjbvhrmjn18wl";
|
||||
};
|
||||
};
|
||||
"sass" = {
|
||||
version = "3.3.9";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0k19vj73283i907z4wfkc9qdska2b19z7ps6lcr5s4qzwis1zkmz";
|
||||
};
|
||||
};
|
||||
"simplecov" = {
|
||||
version = "0.9.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "06hylxlalaxxldpbaqa54gc52wxdff0fixdvjyzr6i4ygxwzr7yf";
|
||||
};
|
||||
dependencies = [
|
||||
"docile"
|
||||
"multi_json"
|
||||
"simplecov-html"
|
||||
];
|
||||
};
|
||||
"simplecov-html" = {
|
||||
version = "0.8.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0jhn3jql73x7hsr00wwv984iyrcg0xhf64s90zaqv2f26blkqfb9";
|
||||
};
|
||||
};
|
||||
"sinatra" = {
|
||||
version = "1.4.5";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0qyna3wzlnvsz69d21lxcm3ixq7db08mi08l0a88011qi4qq701s";
|
||||
};
|
||||
dependencies = [
|
||||
"rack"
|
||||
"rack-protection"
|
||||
"tilt"
|
||||
];
|
||||
};
|
||||
"slop" = {
|
||||
version = "3.6.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "00w8g3j7k7kl8ri2cf1m58ckxk8rn350gp4chfscmgv6pq1spk3n";
|
||||
};
|
||||
};
|
||||
"sprockets" = {
|
||||
version = "2.12.3";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1bn2drr8bc2af359dkfraq0nm0p1pib634kvhwn5lvj3r4vllnn2";
|
||||
};
|
||||
dependencies = [
|
||||
"hike"
|
||||
"multi_json"
|
||||
"rack"
|
||||
"tilt"
|
||||
];
|
||||
};
|
||||
"sprockets-rails" = {
|
||||
version = "2.2.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "192d4vfl1gjz6phli6sqk98364x6v4jkpl5imajvimsinvgyv81b";
|
||||
};
|
||||
dependencies = [
|
||||
"actionpack"
|
||||
"activesupport"
|
||||
"sprockets"
|
||||
];
|
||||
};
|
||||
"teaspoon" = {
|
||||
version = "0.8.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1j3brbm9cv5km9d9wzb6q2b3cvc6m254z48h7h77z1w6c5wr0p3z";
|
||||
};
|
||||
dependencies = [
|
||||
"railties"
|
||||
];
|
||||
};
|
||||
"term-ansicolor" = {
|
||||
version = "1.3.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1a2gw7gmpmx57sdpyhjwl0zn4bqp7jyjz7aslpvvphd075layp4b";
|
||||
};
|
||||
dependencies = [
|
||||
"tins"
|
||||
];
|
||||
};
|
||||
"therubyracer" = {
|
||||
version = "0.12.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "106fqimqyaalh7p6czbl5m2j69z8gv7cm10mjb8bbb2p2vlmqmi6";
|
||||
};
|
||||
dependencies = [
|
||||
"libv8"
|
||||
"ref"
|
||||
];
|
||||
};
|
||||
"thor" = {
|
||||
version = "0.19.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "08p5gx18yrbnwc6xc0mxvsfaxzgy2y9i78xq7ds0qmdm67q39y4z";
|
||||
};
|
||||
};
|
||||
"thread_safe" = {
|
||||
version = "0.3.4";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1cil2zcdzqkyr8zrwhlg7gywryg36j4mxlxw0h0x0j0wjym5nc8n";
|
||||
};
|
||||
};
|
||||
"tilt" = {
|
||||
version = "1.4.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "00sr3yy7sbqaq7cb2d2kpycajxqf1b1wr1yy33z4bnzmqii0b0ir";
|
||||
};
|
||||
};
|
||||
"tins" = {
|
||||
version = "1.1.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "0jddc40lw8lzn421p6pjvvs7b37qyd8jgsl5nrq16rc46wgx2r2r";
|
||||
};
|
||||
};
|
||||
"tzinfo" = {
|
||||
version = "1.2.2";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1c01p3kg6xvy1cgjnzdfq45fggbwish8krd0h864jvbpybyx7cgx";
|
||||
};
|
||||
dependencies = [
|
||||
"thread_safe"
|
||||
];
|
||||
};
|
||||
"uglifier" = {
|
||||
version = "2.5.1";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1vihq309mzv9a2i0s8v4imrn1g2kj8z0vr88q3i5b657c4kxzfp0";
|
||||
};
|
||||
dependencies = [
|
||||
"execjs"
|
||||
"json"
|
||||
];
|
||||
};
|
||||
"webmock" = {
|
||||
version = "1.18.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "1r21a4x7dljb3cqxp7w7mdq5a1xvw9kn6m3gldsldsfza5b4hq03";
|
||||
};
|
||||
dependencies = [
|
||||
"addressable"
|
||||
"crack"
|
||||
];
|
||||
};
|
||||
"xpath" = {
|
||||
version = "2.0.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "04kcr127l34p7221z13blyl0dvh0bmxwx326j72idayri36a394w";
|
||||
};
|
||||
dependencies = [
|
||||
"nokogiri"
|
||||
];
|
||||
};
|
||||
"zeroclipboard-rails" = {
|
||||
version = "0.1.0";
|
||||
source = {
|
||||
type = "gem";
|
||||
sha256 = "00ixal0a0mxaqsyzp06c6zz4qdwqydy1qv4n7hbyqfhbmsdalcfc";
|
||||
};
|
||||
dependencies = [
|
||||
"railties"
|
||||
];
|
||||
};
|
||||
}
|
71
pkgs/applications/networking/cluster/panamax/ui.nix
Normal file
71
pkgs/applications/networking/cluster/panamax/ui.nix
Normal file
|
@ -0,0 +1,71 @@
|
|||
{ stdenv, fetchgit, fetchurl, makeWrapper, bundlerEnv, bundler_HEAD
|
||||
, ruby, rubygemsFun, openssl, sqlite, dataDir ? "/var/lib/panamax-ui"}:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
env = bundlerEnv {
|
||||
name = "panamax-api-gems";
|
||||
inherit ruby;
|
||||
gemset = ./gemset-ui.nix;
|
||||
gemfile = ./Gemfile-ui;
|
||||
lockfile = ./Gemfile-ui.lock;
|
||||
};
|
||||
bundler = bundler_HEAD.override { inherit ruby; };
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
name = "panamax-ui-${version}";
|
||||
version = "0.2.11";
|
||||
|
||||
src = fetchgit {
|
||||
rev = "refs/tags/v${version}";
|
||||
url = "git://github.com/CenturyLinkLabs/panamax-ui";
|
||||
sha256 = "17j5ac8fzp377bzg7f239jdcc9j0c63bkx0ill5nl10i3h05z7jh";
|
||||
};
|
||||
|
||||
buildInputs = [ makeWrapper env.ruby openssl sqlite bundler ];
|
||||
|
||||
setSourceRoot = ''
|
||||
mkdir -p $out/share
|
||||
cp -R panamax-ui $out/share/panamax-ui
|
||||
export sourceRoot="$out/share/panamax-ui"
|
||||
'';
|
||||
|
||||
postPatch = ''
|
||||
find . -type f -iname "*.haml" -exec sed -e 's|CoreOS Journal|NixOS Journal|g' -i "{}" \;
|
||||
find . -type f -iname "*.haml" -exec sed -e 's|CoreOS Local|NixOS Local|g' -i "{}" \;
|
||||
find . -type f -iname "*.haml" -exec sed -e 's|CoreOS Host|NixOS Host|g' -i "{}" \;
|
||||
sed -e 's|CoreOS Local|NixOS Local|g' -i "spec/features/manage_application_spec.rb"
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
export HOME=$PWD
|
||||
export GEM_HOME=${env}/${env.ruby.gemPath}
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
rm -f ./bin/*
|
||||
bundle exec rake rails:update:bin
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
rm -rf log tmp db
|
||||
ln -sf ${dataDir}/{db,state/log,state/tmp} .
|
||||
|
||||
mkdir -p $out/bin
|
||||
makeWrapper bin/bundle "$out/bin/bundle" \
|
||||
--run "cd $out/share/panamax-ui" \
|
||||
--prefix "PATH" : "$out/share/panamax-ui/bin:${env.ruby}/bin:$PATH" \
|
||||
--prefix "HOME" : "$out/share/panamax-ui" \
|
||||
--prefix "GEM_HOME" : "${env}/${env.ruby.gemPath}" \
|
||||
--prefix "GEM_PATH" : "$out/share/panamax-ui:${bundler}/${env.ruby.gemPath}"
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://github.com/CenturyLinkLabs/panamax-ui;
|
||||
description = "The Web GUI for Panamax";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ matejc offline ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenv, fetchFromGitHub, python34Packages, readline, ncurses, canto-daemon }:
|
||||
|
||||
python34Packages.buildPythonPackage rec {
|
||||
version = "0.9.1";
|
||||
name = "canto-curses-${version}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "themoken";
|
||||
repo = "canto-curses";
|
||||
rev = "v${version}";
|
||||
sha256 = "1vb5g0vdkp233r09qv0g4rgz7nprr2a625lf6nf6a51wpimdwgdy";
|
||||
};
|
||||
|
||||
buildInputs = [ readline ncurses canto-daemon ];
|
||||
propagatedBuildInputs = [ canto-daemon ];
|
||||
|
||||
meta = {
|
||||
description = "An ncurses-based console Atom/RSS feed reader";
|
||||
longDescription = ''
|
||||
Canto is an Atom/RSS feed reader for the console that is meant to be
|
||||
quick, concise, and colorful. It's meant to allow you to crank through
|
||||
feeds like you've never cranked before by providing a minimal, yet
|
||||
information packed interface. No navigating menus. No dense blocks of
|
||||
unreadable white text. An interface with almost infinite customization
|
||||
and extensibility using the excellent Python programming language.
|
||||
'';
|
||||
homepage = http://codezen.org/canto-ng/;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.devhell ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenv, fetchFromGitHub, python34Packages, }:
|
||||
|
||||
python34Packages.buildPythonPackage rec {
|
||||
version = "0.9.1";
|
||||
name = "canto-daemon-${version}";
|
||||
namePrefix = "";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "themoken";
|
||||
repo = "canto-next";
|
||||
rev = "v${version}";
|
||||
sha256 = "14lh6x0yz2asspwdi1ims01589r79q0dv77vq61gfjk5wiwfbdwa";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with python34Packages; [ feedparser ];
|
||||
|
||||
meta = {
|
||||
description = "Daemon for the canto Atom/RSS feed reader";
|
||||
longDescription = ''
|
||||
Canto is an Atom/RSS feed reader for the console that is meant to be
|
||||
quick, concise, and colorful. It's meant to allow you to crank through
|
||||
feeds like you've never cranked before by providing a minimal, yet
|
||||
information packed interface. No navigating menus. No dense blocks of
|
||||
unreadable white text. An interface with almost infinite customization
|
||||
and extensibility using the excellent Python programming language.
|
||||
'';
|
||||
homepage = http://codezen.org/canto-ng/;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
maintainers = [ stdenv.lib.maintainers.devhell ];
|
||||
};
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
{stdenv, fetchurl, cmake, flex, bison, openssl, libpcap, perl, zlib, file, curl, geoip, gperftools }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "bro-2.3.1";
|
||||
name = "bro-2.3.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.bro.org/downloads/release/${name}.tar.gz";
|
||||
sha256 = "0008wq20xa3z95ccjspxgx7asvny28r7qlj254zdnbax6cgd4cpz";
|
||||
sha256 = "16y6924brh7sw6l0nry6y4q8sif2lkcpymkd26aabdc61bdgpr9g";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake flex bison openssl libpcap perl zlib file curl geoip gperftools ];
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
{ stdenv, fetchgit, libtoxcore
|
||||
, conf ? null }:
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "ratox-dev-20150107";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.2f30.org/ratox";
|
||||
rev = "8be76e4cc829d86b8e1cae43a0d932600d6ff9fb";
|
||||
sha256 = "7fe492de3e69a08f9c1bb59a319d0e410905f06514abe99b4d4fe5c899650448";
|
||||
};
|
||||
|
||||
buildInputs = [ libtoxcore ];
|
||||
|
||||
configFile = optionalString (conf!=null) (builtins.toFile "config.h" conf);
|
||||
preConfigure = optionalString (conf!=null) "cp ${configFile} config.def.h";
|
||||
|
||||
preBuild = "makeFlags=PREFIX=$out";
|
||||
|
||||
meta =
|
||||
{ description = "FIFO based tox client";
|
||||
homepage = http://ratox.2f30.org/;
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ emery ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -7,16 +7,16 @@
|
|||
with stdenv.lib;
|
||||
|
||||
let
|
||||
version = "1.0";
|
||||
version = "1.1";
|
||||
|
||||
main = {
|
||||
name = "tkabber";
|
||||
sha256 = "49ee6e897dfe52ebac256531b54955e6b39223f606a9b8ad63a52475389db206";
|
||||
sha256 = "1ip0mi2icqkjxiam4qj1qcynnz9ck1ggzcbcqyjj132hakd855a2";
|
||||
};
|
||||
|
||||
plugins = {
|
||||
name = "tkabber-plugins";
|
||||
sha256 = "d61251dc664f0bfa8534e578096dede9a7bb7d4f2620489f8d2c43d36cd61ba9";
|
||||
sha256 = "1dr12rh4vs1w1bga45k4ijgxs39801c1k4z3b892pn1dwv84il5y";
|
||||
};
|
||||
|
||||
tclLibraries = [ bwidget tcllib tcltls tclgpg ];
|
||||
|
|
|
@ -1,26 +1,24 @@
|
|||
{ stdenv, lib, fetchgit, fetchhg, go_1_3, trousers }:
|
||||
{ lib, goPackages, fetchgit, trousers }:
|
||||
|
||||
let deps = import ./deps.nix {
|
||||
inherit stdenv lib fetchgit fetchhg;
|
||||
};
|
||||
with goPackages;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
name = "pond";
|
||||
buildGoPackage rec {
|
||||
rev = "f4e441c77a2039814046ff8219629c547fe8b689";
|
||||
name = "pond-${lib.strings.substring 0 7 rev}";
|
||||
goPackagePath = "github.com/agl/pond";
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "git://github.com/agl/pond.git";
|
||||
sha256 = "f2dfc6cb96cc4b8ae732e41d1958b62036f40cb346df2e14f27b5964a1416026";
|
||||
};
|
||||
|
||||
buildInputs = [ go_1_3 trousers ];
|
||||
subPackages = [ "client" ];
|
||||
|
||||
unpackPhase = ''
|
||||
export GOPATH=$PWD
|
||||
echo $PWD
|
||||
cp -LR ${deps}/src src
|
||||
chmod u+w -R src
|
||||
'';
|
||||
buildInputs = [ trousers net crypto protobuf ed25519 ];
|
||||
|
||||
buildFlags = "--tags nogui";
|
||||
|
||||
installPhase = ''
|
||||
export GOPATH="$PWD"
|
||||
mkdir -p $out/bin
|
||||
go build --tags nogui -v -o $out/bin/pond-cli github.com/agl/pond/client
|
||||
'';
|
||||
dontInstallSrc = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Forward secure, asynchronous messaging for the discerning";
|
||||
|
|
|
@ -1,60 +0,0 @@
|
|||
# This file was generated by go2nix.
|
||||
{ stdenv, lib, fetchgit, fetchhg}:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/agl/pond";
|
||||
src = fetchgit {
|
||||
url = "git://github.com/agl/pond.git";
|
||||
rev = "f4e441c77a2039814046ff8219629c547fe8b689";
|
||||
sha256 = "f2dfc6cb96cc4b8ae732e41d1958b62036f40cb346df2e14f27b5964a1416026";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/agl/ed25519";
|
||||
src = fetchgit {
|
||||
url = "git://github.com/agl/ed25519.git";
|
||||
rev = "d2b94fd789ea21d12fac1a4443dd3a3f79cda72c";
|
||||
sha256 = "83e3010509805d1d315c7aa85a356fda69d91b51ff99ed98a503d63adb3613e9";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/go.crypto";
|
||||
src = fetchhg {
|
||||
url = "https://code.google.com/p/go.crypto";
|
||||
rev = "31393df5baea";
|
||||
sha256 = "0b95dpsvxxapcjjvhj05fdmyn0mzffamc25hvxy7xgsl2l9yy3nw";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/go.net";
|
||||
src = fetchhg {
|
||||
url = "https://code.google.com/p/go.net";
|
||||
rev = "90e232e2462d";
|
||||
sha256 = "0hqvkaa0rbxwbi74xa6aqbkf63zk662x5hp3bp8vbhzkc4yl1h59";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "code.google.com/p/goprotobuf";
|
||||
src = fetchhg {
|
||||
url = "https://code.google.com/p/goprotobuf";
|
||||
rev = "36be16571e14";
|
||||
sha256 = "14yay2sgfbbs0bx3q03bdqn1kivyvxfdm34rmp2612gvinlll215";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "go-deps";
|
||||
|
||||
buildCommand =
|
||||
lib.concatStrings
|
||||
(map (dep: ''
|
||||
mkdir -p $out/src/`dirname ${dep.root}`
|
||||
ln -s ${dep.src} $out/src/${dep.root}
|
||||
'') goDeps);
|
||||
}
|
||||
|
|
@ -11,13 +11,13 @@ stdenv.mkDerivation rec {
|
|||
|
||||
mainSrc = fetchurl {
|
||||
# signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
|
||||
url = "http://rsync.samba.org/ftp/rsync/src/rsync-${version}.tar.gz";
|
||||
url = "mirror://samba/rsync/src/rsync-${version}.tar.gz";
|
||||
sha256 = "0896iah6w72q5izpxgkai75bn40dqkqifi2ivcxjzr2zrx7kdr3x";
|
||||
};
|
||||
|
||||
patchesSrc = fetchurl {
|
||||
# signed with key 0048 C8B0 26D4 C96F 0E58 9C2F 6C85 9FB1 4B96 A8C5
|
||||
url = "http://rsync.samba.org/ftp/rsync/rsync-patches-${version}.tar.gz";
|
||||
url = "mirror://samba/rsync/rsync-patches-${version}.tar.gz";
|
||||
sha256 = "0iij996xbyn20yr4w3kv3rw3cx4jwkg2k85x6w5hb5xlgsis8zjl";
|
||||
};
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
stdenv.mkDerivation (rec {
|
||||
|
||||
name = "unison-2.40.102";
|
||||
name = "unison-2.48.3";
|
||||
src = fetchurl {
|
||||
url = "http://www.seas.upenn.edu/~bcpierce/unison/download/releases/stable/${name}.tar.gz";
|
||||
sha256 = "0m78q5vnsric1virvkmxxx32ipaq0cnj0kbirdbg36395gq94jix";
|
||||
sha256 = "1vmpf11f282sg0dzh28plmd0xcjy3y4z3jszyb1xklwmbvagk5d6";
|
||||
};
|
||||
|
||||
buildInputs = [ ocaml makeWrapper ncurses ];
|
||||
|
|
|
@ -1,40 +1,32 @@
|
|||
{ stdenv, fetchgit, go }:
|
||||
{ lib, fetchgit, goPackages }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "syncthing-${version}";
|
||||
version = "0.10.21";
|
||||
|
||||
version = "0.10.22";
|
||||
goPackagePath = "github.com/syncthing/syncthing";
|
||||
src = fetchgit {
|
||||
url = "git://github.com/syncthing/syncthing.git";
|
||||
rev = "refs/tags/v${version}";
|
||||
sha256 = "60cd8607cf7d2837252680f6c2879aba1f35a2c74a47c2f2ea874d6eed2adaa5";
|
||||
sha256 = "d96eff0dac5d542388d643f4b9e29ade6f7c52a570a00a48e7b5f81882d719dc";
|
||||
};
|
||||
|
||||
buildInputs = [ go ];
|
||||
subPackages = [ "cmd/syncthing" ];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir -p "./dependencies/src/github.com/syncthing/syncthing"
|
||||
cp -r internal "./dependencies/src/github.com/syncthing/syncthing"
|
||||
buildFlagsArray = "-ldflags=-w -X main.Version v${version}";
|
||||
|
||||
export GOPATH="`pwd`/Godeps/_workspace:`pwd`/dependencies"
|
||||
preBuild = "export GOPATH=$GOPATH:$NIX_BUILD_TOP/go/src/${goPackagePath}/Godeps/_workspace";
|
||||
|
||||
go run build.go test
|
||||
doCheck = true;
|
||||
|
||||
mkdir ./bin
|
||||
|
||||
go build -o ./bin/syncthing -ldflags "-w -X main.Version v${version}" ./cmd/syncthing
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp -r ./bin $out
|
||||
'';
|
||||
dontInstallSrc = true;
|
||||
|
||||
meta = {
|
||||
homepage = http://syncthing.net/;
|
||||
description = "Replaces Dropbox and BitTorrent Sync with something open, trustworthy and decentralized";
|
||||
license = with stdenv.lib.licenses; mit;
|
||||
maintainers = with stdenv.lib.maintainers; [ matejc ];
|
||||
platforms = with stdenv.lib.platforms; linux;
|
||||
license = with lib.licenses; mit;
|
||||
maintainers = with lib.maintainers; [ matejc ];
|
||||
platforms = with lib.platforms; linux;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
{ stdenv, fetchurl, openssl, protobufc, libconfig }:
|
||||
{ stdenv, fetchFromGitHub, autoreconfHook, openssl, protobufc, libconfig }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "umurmur-0.2.13";
|
||||
name = "umurmur-${version}";
|
||||
version = "0.2.15";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://umurmur.googlecode.com/files/${name}.tar.gz";
|
||||
sha1 = "c9345b67213f52688fef2113132c62d2edbf4bea";
|
||||
src = fetchFromGitHub {
|
||||
owner = "fatbob313";
|
||||
repo = "umurmur";
|
||||
rev = version;
|
||||
sha256 = "0q0apnnb3pszhpsbadw52k6mhdc0hk38rk7vnn7dl4fsisfhgmx2";
|
||||
};
|
||||
|
||||
buildInputs = [ openssl protobufc libconfig ];
|
||||
buildInputs = [ autoreconfHook openssl protobufc libconfig ];
|
||||
|
||||
configureFlags = "--with-ssl=openssl";
|
||||
|
||||
|
@ -16,5 +19,6 @@ stdenv.mkDerivation rec {
|
|||
description = "Minimalistic Murmur (Mumble server)";
|
||||
license = licenses.bsd3;
|
||||
homepage = http://code.google.com/p/umurmur/;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
let
|
||||
|
||||
version = "2.1.4";
|
||||
version = "2.3.0";
|
||||
|
||||
svn = subversionClient.override { perlBindings = true; };
|
||||
|
||||
|
@ -21,7 +21,7 @@ stdenv.mkDerivation {
|
|||
|
||||
src = fetchurl {
|
||||
url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
|
||||
sha256 = "0gh57mfxz1qrxzfp1lpcaqswhixc246kmajlf0db7g0cn6wnhjd0";
|
||||
sha256 = "1jhagfsmn9as6bss0c6zppw0iydcalgmadyywz7kdxbdsqa3mcll";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
|
|
@ -4,22 +4,22 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "makemkv-${ver}";
|
||||
ver = "1.9.0";
|
||||
ver = "1.9.1";
|
||||
builder = ./builder.sh;
|
||||
|
||||
src_bin = fetchurl {
|
||||
url = "http://www.makemkv.com/download/makemkv-bin-${ver}.tar.gz";
|
||||
sha256 = "1rcvg7a1h59mfwsl5w0fr89m101pkqm9vgj06dl91hkgp5nh3wah";
|
||||
sha256 = "0458ilchi64q8yw4kxck565anpn6lf5awrnkz17bk38qdgp0i2nq";
|
||||
};
|
||||
|
||||
src_oss = fetchurl {
|
||||
src_oss = fetchurl {
|
||||
url = "http://www.makemkv.com/download/makemkv-oss-${ver}.tar.gz";
|
||||
sha256 = "0415gw2nacb57sz5m0hcaznynmznc6v8qb6028qnsqgv39d4w8f8";
|
||||
sha256 = "1x4mjx32839gf9k2zrjz2250valnqcaa2q89kc7sipgsl4b7wrr2";
|
||||
};
|
||||
|
||||
buildInputs = [openssl qt4 mesa zlib pkgconfig libav];
|
||||
|
||||
libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc openssl mesa qt4 zlib ]
|
||||
libPath = stdenv.lib.makeLibraryPath [stdenv.cc.cc openssl mesa qt4 zlib ]
|
||||
+ ":" + stdenv.cc.cc + "/lib64";
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
|
|
@ -18,12 +18,12 @@
|
|||
assert withGUI -> wxGTK != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "7.5.0";
|
||||
version = "7.6.0";
|
||||
name = "mkvtoolnix-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.bunkus.org/videotools/mkvtoolnix/sources/${name}.tar.xz";
|
||||
sha256 = "0ksv79zcpp34jzs77r02x119c0h2wyvkgckd0bbwjix0qyczgfhp";
|
||||
sha256 = "1n6waln6r9jx26al3k2nh6wi8p1q6lv2fs48nbc1lj9s2fc35pkl";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -160,6 +160,7 @@ let
|
|||
in
|
||||
{
|
||||
inherit generateCollection;
|
||||
inherit importManifest;
|
||||
inherit isDepAttr;
|
||||
inherit manifest;
|
||||
inherit removePkgDeps;
|
||||
|
|
|
@ -20,4 +20,6 @@ stdenv.mkDerivation (args // {
|
|||
makeFlags = [ "EXTENSION_DIR=$(out)/lib/php/extensions" ] ++ makeFlags;
|
||||
|
||||
autoreconfPhase = "phpize";
|
||||
|
||||
preConfigure = "touch unix.h";
|
||||
})
|
||||
|
|
|
@ -137,6 +137,11 @@ rec {
|
|||
http://www.centervenus.com/mirrors/nongnu/
|
||||
];
|
||||
|
||||
samba = [
|
||||
http://samba.org/ftp/
|
||||
http://ftp.riken.jp/net/samba
|
||||
];
|
||||
|
||||
# BitlBee mirrors, see http://www.bitlbee.org/main.php/mirrors.html .
|
||||
bitlbee = [
|
||||
http://get.bitlbee.org/
|
||||
|
@ -190,7 +195,7 @@ rec {
|
|||
# Fedora (please only add full mirrors that carry old Fedora distributions as well).
|
||||
# See: https://mirrors.fedoraproject.org/publiclist (but not all carry old content).
|
||||
fedora = [
|
||||
http://archives.fedoraproject.org/pub/archive/fedora/
|
||||
http://archives.fedoraproject.org/pub/fedora/
|
||||
http://fedora.osuosl.org/
|
||||
http://ftp.nluug.nl/pub/os/Linux/distr/fedora/
|
||||
http://ftp.funet.fi/pub/mirrors/ftp.redhat.com/pub/fedora/
|
||||
|
@ -199,6 +204,7 @@ rec {
|
|||
http://ftp.linux.cz/pub/linux/fedora/
|
||||
http://ftp.heanet.ie/pub/fedora/
|
||||
http://mirror.1000mbps.com/fedora/
|
||||
http://archives.fedoraproject.org/pub/archive/fedora/
|
||||
];
|
||||
|
||||
# Old SUSE distributions. Unfortunately there is no master site,
|
||||
|
|
|
@ -4,6 +4,7 @@ import sys
|
|||
import os
|
||||
import subprocess
|
||||
import argparse
|
||||
import re
|
||||
import shutil
|
||||
import rpm
|
||||
import urlparse
|
||||
|
@ -14,8 +15,8 @@ import toposort
|
|||
|
||||
|
||||
|
||||
class NixTemplateRPM(object):
|
||||
def __init__(self, specFilename, inputDir=None, maintainer="MAINTAINER"):
|
||||
class SPECTemplate(object):
|
||||
def __init__(self, specFilename, outputDir, inputDir=None, buildRootInclude=None, translateTable=None, repositoryDir=None, allPackagesDir=None, maintainer="MAINTAINER"):
|
||||
rpm.addMacro("buildroot","$out")
|
||||
rpm.addMacro("_libdir","lib")
|
||||
rpm.addMacro("_libexecdir","libexec")
|
||||
|
@ -24,22 +25,41 @@ class NixTemplateRPM(object):
|
|||
rpm.addMacro("_topdir","SPACER_DIR_FOR_REMOVAL")
|
||||
rpm.addMacro("_sourcedir","SOURCE_DIR_SPACER")
|
||||
|
||||
self.packageGroups = [ "ocaml", "python" ]
|
||||
|
||||
ts = rpm.TransactionSet()
|
||||
|
||||
self.specFilename = specFilename
|
||||
self.spec = ts.parseSpec(specFilename)
|
||||
|
||||
self.inputDir = inputDir
|
||||
self.buildRootInclude = buildRootInclude
|
||||
self.repositoryDir = repositoryDir
|
||||
self.allPackagesDir = allPackagesDir
|
||||
self.maintainer = maintainer
|
||||
|
||||
self.packageGroups = [ "ocaml", "python" ]
|
||||
self.translateTable = translateTable
|
||||
|
||||
self.facts = self.getFacts()
|
||||
self.key = self.getSelfKey()
|
||||
|
||||
tmpDir = os.path.join(outputDir, self.rewriteName(self.spec.sourceHeader['name']))
|
||||
if self.translateTable != None:
|
||||
self.relOutputDir = self.translateTable.path(self.key,tmpDir)
|
||||
else:
|
||||
self.relOutputDir = tmpDir
|
||||
|
||||
self.final_output_dir = os.path.normpath( self.relOutputDir )
|
||||
|
||||
if self.repositoryDir != None:
|
||||
self.potential_repository_dir = os.path.normpath( os.path.join(self.repositoryDir,self.relOutputDir) )
|
||||
|
||||
|
||||
|
||||
def rewriteCommands(self, string):
|
||||
string = string.replace('SPACER_DIR_FOR_REMOVAL/','')
|
||||
string = string.replace('SPACER_DIR_FOR_REMOVAL','')
|
||||
string = '\n'.join(map(lambda line: ' '.join(map(lambda x: x.replace('SOURCE_DIR_SPACER/','${./')+'}' if x.startswith('SOURCE_DIR_SPACER/') else x, line.split(' '))), string.split('\n')))
|
||||
string = '\n'.join(map(lambda line: ' '.join(map(lambda x: x.replace('SOURCE_DIR_SPACER/',('${./' if (self.buildRootInclude == None) else '${buildRoot}/usr/share/buildroot/SOURCES/'))+('}' if (self.buildRootInclude == None) else '') if x.startswith('SOURCE_DIR_SPACER/') else x, line.split(' '))), string.split('\n')))
|
||||
string = string.replace('\n','\n ')
|
||||
string = string.rstrip()
|
||||
return string
|
||||
|
@ -85,18 +105,31 @@ class NixTemplateRPM(object):
|
|||
else:
|
||||
raise Exception("Unknown target")
|
||||
packages = []
|
||||
|
||||
return packages
|
||||
|
||||
|
||||
def getBuildInputs(self,target=None):
|
||||
return self.rewriteInputs(target,self.spec.sourceHeader['requires'])
|
||||
inputs = self.rewriteInputs(target,self.spec.sourceHeader['requires'])
|
||||
if self.translateTable != None:
|
||||
return map(lambda x: self.translateTable.name(x), inputs)
|
||||
else:
|
||||
return inputs
|
||||
|
||||
def getSelf(self):
|
||||
def getSelfKey(self):
|
||||
name = self.spec.sourceHeader['name']
|
||||
if len(name.split('-')) > 1 and name.split('-')[0] in self.packageGroups:
|
||||
return self.rewriteInputs(name.split('-')[0], [self.spec.sourceHeader['name']])[0]
|
||||
key = self.rewriteInputs(name.split('-')[0], [self.spec.sourceHeader['name']])[0]
|
||||
else:
|
||||
return self.rewriteInputs(None, [self.spec.sourceHeader['name']])[0]
|
||||
key = self.rewriteInputs(None, [self.spec.sourceHeader['name']])[0]
|
||||
return key
|
||||
|
||||
def getSelf(self):
|
||||
if self.translateTable != None:
|
||||
return self.translateTable.name(self.key)
|
||||
else:
|
||||
return self.key
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -112,12 +145,34 @@ class NixTemplateRPM(object):
|
|||
shutil.copyfile(os.path.join(input_dir, filename), os.path.join(output_dir, filename))
|
||||
|
||||
|
||||
def getFacts(self):
|
||||
facts = {}
|
||||
facts["name"] = self.rewriteName(self.spec.sourceHeader['name'])
|
||||
facts["version"] = self.spec.sourceHeader['version']
|
||||
|
||||
facts["url"] = []
|
||||
facts["sha256"] = []
|
||||
sources = [source for (source, _, flag) in self.spec.sources if flag==1 if urlparse.urlparse(source).scheme in ["http", "https"] ]
|
||||
for url in sources:
|
||||
p = subprocess.Popen(['nix-prefetch-url', url], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
output, err = p.communicate()
|
||||
sha256 = output[:-1] #remove new line
|
||||
facts["url"].append(url)
|
||||
facts["sha256"].append(sha256)
|
||||
|
||||
patches = [source for (source, _, flag) in self.spec.sources if flag==2]
|
||||
if self.buildRootInclude == None:
|
||||
facts["patches"] = map(lambda x: './'+x, patches)
|
||||
else:
|
||||
facts["patches"] = map(lambda x: '"${buildRoot}/usr/share/buildroot/SOURCES/'+x+'"', reversed(patches))
|
||||
|
||||
return facts
|
||||
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
out = 'stdenv.mkDerivation {\n'
|
||||
out += ' name = "' + self.rewriteName(self.spec.sourceHeader['name']) + '-' + self.spec.sourceHeader['version'] + '";\n'
|
||||
out += ' version = "' + self.spec.sourceHeader['version'] + '";\n'
|
||||
out = ' name = "' + self.facts["name"] + '-' + self.facts["version"] + '";\n'
|
||||
out += ' version = "' + self.facts['version'] + '";\n'
|
||||
return out
|
||||
|
||||
|
||||
|
@ -125,10 +180,7 @@ class NixTemplateRPM(object):
|
|||
def src(self):
|
||||
sources = [source for (source, _, flag) in self.spec.sources if flag==1 if urlparse.urlparse(source).scheme in ["http", "https"] ]
|
||||
out = ''
|
||||
for url in sources:
|
||||
p = subprocess.Popen(['nix-prefetch-url', url], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
output, err = p.communicate()
|
||||
sha256 = output[:-1] #remove new line
|
||||
for (url,sha256) in zip(self.facts['url'],self.facts['sha256']):
|
||||
out += ' src = fetchurl {\n'
|
||||
out += ' url = "' + url + '";\n'
|
||||
out += ' sha256 = "' + sha256 + '";\n'
|
||||
|
@ -138,8 +190,7 @@ class NixTemplateRPM(object):
|
|||
|
||||
@property
|
||||
def patch(self):
|
||||
patches = [source for (source, _, flag) in self.spec.sources if flag==2]
|
||||
out = ' patches = [ ' + ' '.join(map(lambda x: './'+x, patches)) + ' ];\n'
|
||||
out = ' patches = [ ' + ' '.join(self.facts['patches']) + ' ];\n'
|
||||
return out
|
||||
|
||||
|
||||
|
@ -189,11 +240,29 @@ class NixTemplateRPM(object):
|
|||
return out
|
||||
|
||||
|
||||
|
||||
def __str__(self):
|
||||
head = '{stdenv, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
|
||||
body = [ self.name, self.src, self.patch, self.buildInputs, self.configure, self.build, self.ocamlExtra, self.install, self.meta ]
|
||||
return head + '\n'.join(body)
|
||||
head = '{stdenv, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
|
||||
head += 'stdenv.mkDerivation {\n'
|
||||
body = [ self.name, self.src, self.patch, self.buildInputs, self.configure, self.build, self.ocamlExtra, self.install, self.meta ]
|
||||
return head + '\n'.join(body)
|
||||
|
||||
|
||||
def getTemplate(self):
|
||||
head = '{stdenv, buildRoot, fetchurl, ' + ', '.join(self.getBuildInputs("ALL")) + '}:\n\n'
|
||||
head += 'let\n'
|
||||
head += ' buildRootInput = (import "${buildRoot}/usr/share/buildroot/buildRootInput.nix") { fetchurl=fetchurl; buildRoot=buildRoot; };\n'
|
||||
head += 'in\n\n'
|
||||
head += 'stdenv.mkDerivation {\n'
|
||||
head += ' inherit (buildRootInput.'+self.rewriteName(self.spec.sourceHeader['name'])+') name version src;\n'
|
||||
head += ' patches = buildRootInput.'+self.rewriteName(self.spec.sourceHeader['name'])+'.patches ++ [];\n\n'
|
||||
body = [ self.buildInputs, self.configure, self.build, self.ocamlExtra, self.install, self.meta ]
|
||||
return head + '\n'.join(body)
|
||||
|
||||
|
||||
def getInclude(self):
|
||||
head = self.rewriteName(self.spec.sourceHeader['name']) + ' = {\n'
|
||||
body = [ self.name, self.src, self.patch ]
|
||||
return head + '\n'.join(body) + '};\n'
|
||||
|
||||
|
||||
def __cmp__(self,other):
|
||||
|
@ -203,8 +272,8 @@ class NixTemplateRPM(object):
|
|||
return -1
|
||||
|
||||
|
||||
def callPackage(self, output_dir):
|
||||
callPackage = ' ' + self.getSelf() + ' = callPackage ' + os.path.relpath(output_dir) + ' {'
|
||||
def callPackage(self):
|
||||
callPackage = ' ' + self.getSelf() + ' = callPackage ' + os.path.relpath(self.final_output_dir, self.allPackagesDir) + ' {'
|
||||
newline = False;
|
||||
for target in self.packageGroups:
|
||||
tmp = self.getBuildInputs(target)
|
||||
|
@ -219,25 +288,141 @@ class NixTemplateRPM(object):
|
|||
|
||||
|
||||
|
||||
def generateTemplate(self, outputDir):
|
||||
output_dir = os.path.normpath( os.path.join(outputDir, self.rewriteName(self.spec.sourceHeader['name'])) )
|
||||
if not os.path.exists(output_dir):
|
||||
os.makedirs(output_dir)
|
||||
def generateCombined(self):
|
||||
if not os.path.exists(self.final_output_dir):
|
||||
os.makedirs(self.final_output_dir)
|
||||
|
||||
if self.inputDir != None:
|
||||
self.copySources(self.inputDir, output_dir)
|
||||
self.copyPatches(self.inputDir, output_dir)
|
||||
self.copySources(self.inputDir, self.final_output_dir)
|
||||
self.copyPatches(self.inputDir, self.final_output_dir)
|
||||
|
||||
nixfile = open(os.path.join(output_dir,'default.nix'), 'w')
|
||||
nixfile = open(os.path.join(self.final_output_dir,'default.nix'), 'w')
|
||||
nixfile.write(str(self))
|
||||
nixfile.close()
|
||||
|
||||
shutil.copyfile(self.specFilename, os.path.join(output_dir, os.path.basename(self.specFilename)))
|
||||
|
||||
self.pkgCall = self.callPackage(output_dir)
|
||||
shutil.copyfile(self.specFilename, os.path.join(self.final_output_dir, os.path.basename(self.specFilename)))
|
||||
|
||||
|
||||
|
||||
def generateSplit(self):
|
||||
if not os.path.exists(self.final_output_dir):
|
||||
os.makedirs(self.final_output_dir)
|
||||
|
||||
nixfile = open(os.path.join(self.final_output_dir,'default.nix'), 'w')
|
||||
nixfile.write(self.getTemplate())
|
||||
nixfile.close()
|
||||
|
||||
return self.getInclude()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class NixTemplate(object):
|
||||
def __init__(self, nixfile):
|
||||
self.nixfile = nixfile
|
||||
self.original = { "name":None, "version":None, "url":None, "sha256":None, "patches":None }
|
||||
self.update = { "name":None, "version":None, "url":None, "sha256":None, "patches":None }
|
||||
self.matchedLines = {}
|
||||
|
||||
if os.path.isfile(nixfile):
|
||||
with file(nixfile, 'r') as infile:
|
||||
for (n,line) in enumerate(infile):
|
||||
name = re.match(r'^\s*name\s*=\s*"(.*?)"\s*;\s*$', line)
|
||||
version = re.match(r'^\s*version\s*=\s*"(.*?)"\s*;\s*$', line)
|
||||
url = re.match(r'^\s*url\s*=\s*"?(.*?)"?\s*;\s*$', line)
|
||||
sha256 = re.match(r'^\s*sha256\s*=\s*"(.*?)"\s*;\s*$', line)
|
||||
patches = re.match(r'^\s*patches\s*=\s*(\[.*?\])\s*;\s*$', line)
|
||||
if name != None and self.original["name"] == None:
|
||||
self.original["name"] = name.group(1)
|
||||
self.matchedLines[n] = "name"
|
||||
if version != None and self.original["version"] == None:
|
||||
self.original["version"] = version.group(1)
|
||||
self.matchedLines[n] = "version"
|
||||
if url != None and self.original["url"] == None:
|
||||
self.original["url"] = url.group(1)
|
||||
self.matchedLines[n] = "url"
|
||||
if sha256 != None and self.original["sha256"] == None:
|
||||
self.original["sha256"] = sha256.group(1)
|
||||
self.matchedLines[n] = "sha256"
|
||||
if patches != None and self.original["patches"] == None:
|
||||
self.original["patches"] = patches.group(1)
|
||||
self.matchedLines[n] = "patches"
|
||||
|
||||
|
||||
def generateUpdated(self, nixOut):
|
||||
nixTemplateFile = open(os.path.normpath(self.nixfile),'r')
|
||||
nixOutFile = open(os.path.normpath(nixOut),'w')
|
||||
for (n,line) in enumerate(nixTemplateFile):
|
||||
if self.matchedLines.has_key(n) and self.update[self.matchedLines[n]] != None:
|
||||
nixOutFile.write(line.replace(self.original[self.matchedLines[n]], self.update[self.matchedLines[n]], 1))
|
||||
else:
|
||||
nixOutFile.write(line)
|
||||
nixTemplateFile.close()
|
||||
nixOutFile.close()
|
||||
|
||||
|
||||
def loadUpdate(self,orig):
|
||||
if orig.has_key("name") and orig.has_key("version"):
|
||||
self.update["name"] = orig["name"] + '-' + orig["version"]
|
||||
self.update["version"] = orig["version"]
|
||||
if orig.has_key("url") and orig.has_key("sha256") and len(orig["url"])>0:
|
||||
self.update["url"] = orig["url"][0]
|
||||
self.update["sha256"] = orig["sha256"][0]
|
||||
for url in orig["url"][1:-1]:
|
||||
sys.stderr.write("WARNING: URL has been dropped: %s\n" % url)
|
||||
if orig.has_key("patches"):
|
||||
self.update["patches"] = '[ ' + ' '.join(orig['patches']) + ' ]'
|
||||
|
||||
|
||||
class TranslationTable(object):
|
||||
def __init__(self):
|
||||
self.tablePath = {}
|
||||
self.tableName = {}
|
||||
|
||||
def update(self, key, path, name=None):
|
||||
self.tablePath[key] = path
|
||||
if name != None:
|
||||
self.tableName[key] = name
|
||||
|
||||
def readTable(self, tableFile):
|
||||
with file(tableFile, 'r') as infile:
|
||||
for line in infile:
|
||||
match = re.match(r'^(.+?)\s+(.+?)\s+(.+?)\s*$', line)
|
||||
if match != None:
|
||||
if not self.tablePath.has_key(match.group(1)):
|
||||
self.tablePath[match.group(1)] = match.group(2)
|
||||
if not self.tableName.has_key(match.group(1)):
|
||||
self.tableName[match.group(1)] = match.group(3)
|
||||
else:
|
||||
match = re.match(r'^(.+?)\s+(.+?)\s*$', line)
|
||||
if not self.tablePath.has_key(match.group(1)):
|
||||
self.tablePath[match.group(1)] = match.group(2)
|
||||
|
||||
def writeTable(self, tableFile):
|
||||
outFile = open(os.path.normpath(tableFile),'w')
|
||||
keys = self.tablePath.keys()
|
||||
keys.sort()
|
||||
for k in keys:
|
||||
if self.tableName.has_key(k):
|
||||
outFile.write( k + " " + self.tablePath[k] + " " + self.tableName[k] + "\n" )
|
||||
else:
|
||||
outFile.write( k + " " + self.tablePath[k] + "\n" )
|
||||
outFile.close()
|
||||
|
||||
def name(self, key):
|
||||
if self.tableName.has_key(key):
|
||||
return self.tableName[key]
|
||||
else:
|
||||
return key
|
||||
|
||||
def path(self, key, orig):
|
||||
if self.tablePath.has_key(key):
|
||||
return self.tablePath[key]
|
||||
else:
|
||||
return orig
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -247,23 +432,65 @@ if __name__ == "__main__":
|
|||
parser = argparse.ArgumentParser(description="Generate .nix templates from RPM spec files")
|
||||
parser.add_argument("specs", metavar="SPEC", nargs="+", help="spec file")
|
||||
parser.add_argument("-o", "--output", metavar="OUT_DIR", required=True, help="output directory")
|
||||
parser.add_argument("-i", "--input", metavar="IN_DIR", default=None, help="input directory")
|
||||
parser.add_argument("-m", "--maintainer", metavar="MAINTAINER", required=True, help="package maintainer")
|
||||
parser.add_argument("-b", "--buildRoot", metavar="BUILDROOT_DIR", default=None, help="buildroot output directory")
|
||||
parser.add_argument("-i", "--inputSources", metavar="IN_DIR", default=None, help="sources input directory")
|
||||
parser.add_argument("-m", "--maintainer", metavar="MAINTAINER", default="__NIX_MAINTAINER__", help="package maintainer")
|
||||
parser.add_argument("-r", "--repository", metavar="REP_DIR", default=None, help="nix repository to compare output against")
|
||||
parser.add_argument("-t", "--translate", metavar="TRANSLATE_TABLE", default=None, help="path of translation table for name and path")
|
||||
parser.add_argument("-u", "--translateOut", metavar="TRANSLATE_OUT", default=None, help="output path for updated translation table")
|
||||
parser.add_argument("-a", "--allPackages", metavar="ALL_PACKAGES", default=None, help="top level dir to call packages from")
|
||||
args = parser.parse_args()
|
||||
|
||||
allPackagesDir = os.path.normpath( os.path.dirname(args.allPackages) )
|
||||
if not os.path.exists(allPackagesDir):
|
||||
os.makedirs(allPackagesDir)
|
||||
|
||||
buildRootContent = {}
|
||||
nameMap = {}
|
||||
|
||||
newTable = TranslationTable()
|
||||
if args.translate != None:
|
||||
table = TranslationTable()
|
||||
table.readTable(args.translate)
|
||||
newTable.readTable(args.translate)
|
||||
else:
|
||||
table = None
|
||||
|
||||
for specPath in args.specs:
|
||||
try:
|
||||
sys.stderr.write("INFO: generate nix file from: %s\n" % specPath)
|
||||
spec = NixTemplateRPM(specPath, args.input, args.maintainer)
|
||||
spec.generateTemplate(args.output)
|
||||
|
||||
spec = SPECTemplate(specPath, args.output, args.inputSources, args.buildRoot, table, args.repository, allPackagesDir, args.maintainer)
|
||||
if args.repository != None:
|
||||
if os.path.exists(os.path.join(spec.potential_repository_dir,'default.nix')):
|
||||
nixTemplate = NixTemplate(os.path.join(spec.potential_repository_dir,'default.nix'))
|
||||
nixTemplate.loadUpdate(spec.facts)
|
||||
if not os.path.exists(spec.final_output_dir):
|
||||
os.makedirs(spec.final_output_dir)
|
||||
nixTemplate.generateUpdated(os.path.join(spec.final_output_dir,'default.nix'))
|
||||
else:
|
||||
sys.stderr.write("WARNING: Repository does not contain template: %s\n" % os.path.join(spec.potential_repository_dir,'default.nix'))
|
||||
if args.buildRoot == None:
|
||||
spec.generateCombined()
|
||||
else:
|
||||
buildRootContent[spec.key] = spec.generateSplit()
|
||||
else:
|
||||
if args.buildRoot == None:
|
||||
spec.generateCombined()
|
||||
else:
|
||||
buildRootContent[spec.key] = spec.generateSplit()
|
||||
|
||||
newTable.update(spec.key,spec.relOutputDir,spec.getSelf())
|
||||
nameMap[spec.getSelf()] = spec
|
||||
|
||||
except Exception, e:
|
||||
sys.stderr.write("ERROR: %s failed with:\n%s\n%s\n" % (specPath,e.message,traceback.format_exc()))
|
||||
|
||||
if args.translateOut != None:
|
||||
if not os.path.exists(os.path.dirname(os.path.normpath(args.translateOut))):
|
||||
os.makedirs(os.path.dirname(os.path.normpath(args.translateOut)))
|
||||
newTable.writeTable(args.translateOut)
|
||||
|
||||
graph = {}
|
||||
for k, v in nameMap.items():
|
||||
graph[k] = set(v.getBuildInputs("ALL"))
|
||||
|
@ -271,4 +498,21 @@ if __name__ == "__main__":
|
|||
sortedSpecs = toposort.toposort_flatten(graph)
|
||||
sortedSpecs = filter( lambda x: x in nameMap.keys(), sortedSpecs)
|
||||
|
||||
print '\n\n'.join(map(lambda x: x.pkgCall, map(lambda x: nameMap[x], sortedSpecs)))
|
||||
allPackagesFile = open(os.path.normpath( args.allPackages ), 'w')
|
||||
allPackagesFile.write( '\n\n'.join(map(lambda x: x.callPackage(), map(lambda x: nameMap[x], sortedSpecs))) )
|
||||
allPackagesFile.close()
|
||||
|
||||
if args.buildRoot != None:
|
||||
buildRootFilename = os.path.normpath( args.buildRoot )
|
||||
if not os.path.exists(os.path.dirname(buildRootFilename)):
|
||||
os.makedirs(os.path.dirname(buildRootFilename))
|
||||
buildRootFile = open(buildRootFilename, 'w')
|
||||
buildRootFile.write( "{ fetchurl, buildRoot }: {\n\n" )
|
||||
keys = buildRootContent.keys()
|
||||
keys.sort()
|
||||
for k in keys:
|
||||
buildRootFile.write( buildRootContent[k] + '\n' )
|
||||
buildRootFile.write( "}\n" )
|
||||
buildRootFile.close()
|
||||
|
||||
|
||||
|
|
|
@ -420,9 +420,10 @@ rec {
|
|||
''}
|
||||
|
||||
echo "unpacking RPMs..."
|
||||
set +o pipefail
|
||||
for i in $rpms; do
|
||||
echo "$i..."
|
||||
${rpm}/bin/rpm2cpio "$i" | (chroot /mnt ${cpio}/bin/cpio -i --make-directories)
|
||||
${rpm}/bin/rpm2cpio "$i" | chroot /mnt ${cpio}/bin/cpio -i --make-directories
|
||||
done
|
||||
|
||||
eval "$preInstall"
|
||||
|
@ -1033,6 +1034,32 @@ rec {
|
|||
unifiedSystemDir = true;
|
||||
};
|
||||
|
||||
fedora21i386 = {
|
||||
name = "fedora-21-i386";
|
||||
fullName = "Fedora 21 (i386)";
|
||||
packagesList = fetchurl rec {
|
||||
url = "mirror://fedora/linux/releases/21/Everything/i386/os/repodata/${sha256}-primary.xml.gz";
|
||||
sha256 = "a6ad1140adeef65bbc1fdcc7f8f2b356f0d20c71bbe3f1625038e7f43fc44780";
|
||||
};
|
||||
urlPrefix = mirror://fedora/linux/releases/21/Everything/i386/os;
|
||||
archs = ["noarch" "i386" "i586" "i686"];
|
||||
packages = commonFedoraPackages ++ [ "cronie" "util-linux" ];
|
||||
unifiedSystemDir = true;
|
||||
};
|
||||
|
||||
fedora21x86_64 = {
|
||||
name = "fedora-21-x86_64";
|
||||
fullName = "Fedora 21 (x86_64)";
|
||||
packagesList = fetchurl rec {
|
||||
url = "mirror://fedora/linux/releases/21/Everything/x86_64/os/repodata/${sha256}-primary.xml.gz";
|
||||
sha256 = "e2a28baab2ea4632fad93f9f28144cda3458190888fdf7f2acc9bc289f397e96";
|
||||
};
|
||||
urlPrefix = mirror://fedora/linux/releases/21/Everything/x86_64/os;
|
||||
archs = ["noarch" "x86_64"];
|
||||
packages = commonFedoraPackages ++ [ "cronie" "util-linux" ];
|
||||
unifiedSystemDir = true;
|
||||
};
|
||||
|
||||
opensuse103i386 = {
|
||||
name = "opensuse-10.3-i586";
|
||||
fullName = "openSUSE 10.3 (i586)";
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{stdenv, fetchurl, unzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "symbola-7.18";
|
||||
name = "symbola-7.19";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://users.teilar.gr/~g1951d/Symbola.zip";
|
||||
sha256 = "1dk0qawlgdfh58pz2wb80rs9h8m20nmnr4bhk6jmva8201ixz62f";
|
||||
sha256 = "1g7ngcxffrb9vqnmb0w9jmp349f48s0gsbi69b3g108vs8cacrmd";
|
||||
};
|
||||
docs_pdf = fetchurl {
|
||||
url = "http://users.teilar.gr/~g1951d/Symbola.pdf";
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
{ stdenv, fetchFromGitHub, jdk, jre, ant, coreutils, gnugrep, file }:
|
||||
{ stdenv, fetchFromGitHub, jdk, jre, ant, coreutils, gnugrep, file, libusb
|
||||
, withGui ? false, gtk2 ? null
|
||||
}:
|
||||
|
||||
assert withGui -> gtk2 != null;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
|
||||
version = "1.0.6";
|
||||
name = "arduino-core";
|
||||
name = "arduino${stdenv.lib.optionalString (withGui == false) "-core"}";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "arduino";
|
||||
|
@ -22,12 +26,16 @@ stdenv.mkDerivation rec {
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/arduino
|
||||
cp -r ./build/linux/work/hardware/ $out/share/arduino
|
||||
cp -r ./build/linux/work/libraries/ $out/share/arduino
|
||||
cp -r ./build/linux/work/tools/ $out/share/arduino
|
||||
cp -r ./build/linux/work/lib/ $out/share/arduino
|
||||
cp -r ./build/linux/work/* "$out/share/arduino/"
|
||||
echo ${version} > $out/share/arduino/lib/version.txt
|
||||
|
||||
${stdenv.lib.optionalString withGui ''
|
||||
mkdir -p "$out/bin"
|
||||
sed -i -e "s|^java|${jdk}/bin/java|" "$out/share/arduino/arduino"
|
||||
sed -i -e "s|^LD_LIBRARY_PATH=|LD_LIBRARY_PATH=${gtk2}/lib:|" "$out/share/arduino/arduino"
|
||||
ln -sr "$out/share/arduino/arduino" "$out/bin/arduino"
|
||||
''}
|
||||
|
||||
# Fixup "/lib64/ld-linux-x86-64.so.2" like references in ELF executables.
|
||||
echo "running patchelf on prebuilt binaries:"
|
||||
find "$out" | while read filepath; do
|
||||
|
@ -41,12 +49,16 @@ stdenv.mkDerivation rec {
|
|||
test $? -eq 0 || { echo "patchelf failed to process $filepath"; exit 1; }
|
||||
fi
|
||||
done
|
||||
|
||||
patchelf --set-rpath ${stdenv.lib.makeSearchPath "lib" [ libusb ]} \
|
||||
"$out/share/arduino/hardware/tools/avrdude"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Libraries for the open-source electronics prototyping platform";
|
||||
meta = with stdenv.lib; {
|
||||
description = "Open-source electronics prototyping platform";
|
||||
homepage = http://arduino.cc/;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = [ stdenv.lib.maintainers.antono stdenv.lib.maintainers.robberer ];
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ antono robberer bjornfor ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ stdenv.mkDerivation {
|
|||
];
|
||||
preBuild = ''
|
||||
export makeFlags="$makeFlags LAZARUS_INSTALL_DIR=$out/lazarus/ INSTALL_PREFIX=$out/"
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo -lgcc_s"
|
||||
export NIX_LDFLAGS="$NIX_LDFLAGS -L${stdenv.cc.cc}/lib -lXi -lX11 -lglib-2.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lc -lXext -lpango-1.0 -latk-1.0 -lgdk_pixbuf-2.0 -lcairo -lgcc_s"
|
||||
export LCL_PLATFORM=gtk2
|
||||
mkdir -p $out/share "$out/lazarus"
|
||||
tar xf ${fpc.src} --strip-components=1 -C $out/share -m
|
||||
|
|
|
@ -1,131 +0,0 @@
|
|||
source $stdenv/setup
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
|
||||
# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
|
||||
# Thing.
|
||||
export CPP="gcc -E"
|
||||
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers being
|
||||
# generated to make sure that they use our glibc.
|
||||
if test -e $NIX_CC/nix-support/orig-glibc; then
|
||||
glibc=$(cat $NIX_CC/nix-support/orig-glibc)
|
||||
|
||||
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
|
||||
# source in $NIX_CC/nix-support/add-flags, since that would
|
||||
# cause *this* GCC to be linked against the *previous* GCC.
|
||||
# Need some more modularity there.
|
||||
extraCFlags="-B$glibc/lib -isystem $glibc/include"
|
||||
extraLDFlags="-B$glibc/lib -L$glibc/lib -Wl,-s \
|
||||
-Wl,-dynamic-linker,$glibc/lib/ld-linux.so.2"
|
||||
|
||||
# Oh, what a hack. I should be shot for this. In stage 1, we
|
||||
# should link against the previous GCC, but not afterwards.
|
||||
# Otherwise we retain a dependency. However, ld-wrapper,
|
||||
# which adds the linker flags for the previous GCC, is also
|
||||
# used in stage 2/3. We can prevent it from adding them by
|
||||
# NIX_GLIBC_FLAGS_SET, but then gcc-wrapper will also not add
|
||||
# them, thereby causing stage 1 to fail. So we use a trick to
|
||||
# only set the flags in gcc-wrapper.
|
||||
hook=$(pwd)/ld-wrapper-hook
|
||||
echo "NIX_GLIBC_FLAGS_SET=1" > $hook
|
||||
export NIX_LD_WRAPPER_START_HOOK=$hook
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$glibc/include
|
||||
fi
|
||||
|
||||
export NIX_EXTRA_CFLAGS=$extraCFlags
|
||||
export NIX_EXTRA_LDFLAGS=$extraLDFlags
|
||||
export CFLAGS=$extraCFlags
|
||||
export CXXFLAGS=$extraCFlags
|
||||
export LDFLAGS=$extraLDFlags
|
||||
fi
|
||||
|
||||
|
||||
preConfigure() {
|
||||
|
||||
# Determine the frontends to build.
|
||||
langs="c"
|
||||
if test -n "$langCC"; then
|
||||
langs="$langs,c++"
|
||||
fi
|
||||
if test -n "$langF77"; then
|
||||
langs="$langs,f95"
|
||||
fi
|
||||
if test -n "$langObjC"; then
|
||||
langs="$langs,objc"
|
||||
fi
|
||||
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
|
||||
configureScript=../$sourceRoot/configure
|
||||
configureFlags="--enable-languages=$langs --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-multilib --with-gxx-include-dir=${STDCXX_INCDIR} --host=x86_64-apple-darwin10 --build=x86_64-apple-darwin10 --target=x86_64-apple-darwin10"
|
||||
}
|
||||
|
||||
|
||||
postInstall() {
|
||||
# Remove precompiled headers for now. They are very big and
|
||||
# probably not very useful yet.
|
||||
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
}
|
||||
|
||||
|
||||
postUnpack() {
|
||||
mv $libstdcxx/libstdcxx $sourceRoot/
|
||||
}
|
||||
|
||||
|
||||
STDCXX_INCDIR="$out/include/c++/4.2.1"
|
||||
|
||||
genericBuild
|
||||
|
||||
|
||||
echo '-------------------------------------------------------------------------------------------------------------------------'
|
||||
echo 'libstdcxx'
|
||||
echo '-------------------------------------------------------------------------------------------------------------------------'
|
||||
|
||||
cd ..
|
||||
pwd
|
||||
|
||||
unpackPhase () {
|
||||
true
|
||||
}
|
||||
|
||||
patchPhase() {
|
||||
true
|
||||
}
|
||||
|
||||
preConfigure() {
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build_libstdcxx
|
||||
cd ../build_libstdcxx
|
||||
|
||||
ln -s ../build/gcc gcc
|
||||
|
||||
configureScript=../$sourceRoot/libstdcxx/configure
|
||||
configureFlags="--disable-libstdcxx-pch --disable-libstdcxx-debug --disable-multilib --with-gxx-include-dir=${STDCXX_INCDIR}"
|
||||
}
|
||||
|
||||
postInstall() {
|
||||
echo "cp -v ${STDCXX_INCDIR}/*/bits/* ${STDCXX_INCDIR}/bits/"
|
||||
cp -v ${STDCXX_INCDIR}/*/bits/* ${STDCXX_INCDIR}/bits/
|
||||
}
|
||||
|
||||
genericBuild
|
||||
|
||||
ln -s $out/lib/x86_64 $out/lib64
|
|
@ -1,30 +0,0 @@
|
|||
diff -rc libstdcxx-16-orig/libstdcxx/libstdc++-v3/src/Makefile.in libstdcxx-16/libstdcxx/libstdc++-v3/src/Makefile.in
|
||||
*** libstdcxx-16-orig/libstdcxx/libstdc++-v3/src/Makefile.in Thu Jul 23 19:13:52 2009
|
||||
--- libstdcxx-16/libstdcxx/libstdc++-v3/src/Makefile.in Thu Jul 23 19:38:23 2009
|
||||
***************
|
||||
*** 65,71 ****
|
||||
numeric_members.lo time_members.lo
|
||||
am__objects_2 = basic_file.lo c++locale.lo
|
||||
am__objects_3 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
|
||||
! codecvt.lo complex_io.lo ctype.lo debug.lo debug_list.lo \
|
||||
functexcept.lo globals_locale.lo globals_io.lo ios.lo \
|
||||
ios_failure.lo ios_init.lo ios_locale.lo limits.lo list.lo \
|
||||
locale.lo locale_init.lo locale_facets.lo localename.lo \
|
||||
--- 65,71 ----
|
||||
numeric_members.lo time_members.lo
|
||||
am__objects_2 = basic_file.lo c++locale.lo
|
||||
am__objects_3 = bitmap_allocator.lo pool_allocator.lo mt_allocator.lo \
|
||||
! codecvt.lo complex_io.lo ctype.lo debug.lo \
|
||||
functexcept.lo globals_locale.lo globals_io.lo ios.lo \
|
||||
ios_failure.lo ios_init.lo ios_locale.lo limits.lo list.lo \
|
||||
locale.lo locale_init.lo locale_facets.lo localename.lo \
|
||||
***************
|
||||
*** 315,321 ****
|
||||
complex_io.cc \
|
||||
ctype.cc \
|
||||
debug.cc \
|
||||
- debug_list.cc \
|
||||
functexcept.cc \
|
||||
globals_locale.cc \
|
||||
globals_io.cc \
|
||||
--- 315,320 ----
|
|
@ -1,50 +0,0 @@
|
|||
{ stdenv, fetchurl, noSysDirs
|
||||
, langCC ? true, langObjC ? true, langF77 ? false
|
||||
, profiledCompiler ? false
|
||||
, gmp ? null, mpfr ? null, bison ? null, flex ? null
|
||||
}:
|
||||
|
||||
assert false;
|
||||
assert stdenv.isDarwin;
|
||||
assert langF77 -> gmp != null;
|
||||
|
||||
let
|
||||
version = "4.2.1"; # Upstream GCC version, from `gcc/BASE-VER'.
|
||||
revision = "5666.3"; # Apple's fork revision number.
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gcc-apple-${version}.${revision}";
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src =
|
||||
stdenv.lib.optional true (fetchurl {
|
||||
url = "http://www.opensource.apple.com/tarballs/gcc/gcc-${revision}.tar.gz";
|
||||
sha256 = "0nq1szgqx9ryh1qsn5n6yd55gpvf56wr8f7w1jzabb8idlvz8ikc";
|
||||
}) ++
|
||||
stdenv.lib.optional langCC (fetchurl {
|
||||
url = http://www.opensource.apple.com/tarballs/libstdcxx/libstdcxx-39.tar.gz;
|
||||
sha256 = "ccf4cf432c142778c766affbbf66b61001b6c4f1107bc2b2c77ce45598786b6d";
|
||||
});
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
libstdcxx = "libstdcxx-39";
|
||||
|
||||
sourceRoot = "gcc-${revision}/";
|
||||
|
||||
# The floor_log2_patch is from a Gentoo fix for the same issue:
|
||||
# https://bugs.gentoo.org/attachment.cgi?id=363174&action=diff
|
||||
patches =
|
||||
[ ./pass-cxxcpp.patch ./floor_log2_patch.diff ]
|
||||
++ stdenv.lib.optional noSysDirs ./no-sys-dirs.patch
|
||||
++ stdenv.lib.optional langCC ./fix-libstdc++-link.patch;
|
||||
|
||||
inherit noSysDirs langCC langF77 langObjC;
|
||||
langC = true;
|
||||
|
||||
buildInputs = stdenv.lib.optionals langF77 [ gmp mpfr bison flex ];
|
||||
|
||||
#meta.broken = true;
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
Prevent our libstdc++.dylib from having a runtime dependency on
|
||||
/usr/lib/libstdc++.dylib. This is caused by the implicit -lstdc++
|
||||
passed by g++ when it links libstdc++.dylib. Adding "-nostdlib" to
|
||||
the g++ invocation prevents this.
|
||||
|
||||
jww (2014-06-21): I've added several more patches to this, for building on
|
||||
Mavericks.
|
||||
|
||||
diff -ru -x '*~' libstdcxx-39-orig/libstdcxx/libstdc++-v3/src/Makefile.in libstdcxx-39/libstdcxx/libstdc++-v3/src/Makefile.in
|
||||
--- x/libstdcxx/libstdc++-v3/src/Makefile.in 2006-10-16 21:08:22.000000000 +0200
|
||||
+++ y/libstdcxx/libstdc++-v3/src/Makefile.in 2012-02-17 18:44:05.210570590 +0100
|
||||
@@ -388,7 +388,7 @@
|
||||
|
||||
libstdc___la_DEPENDENCIES = ${version_dep} $(libstdc___la_LIBADD)
|
||||
libstdc___la_LDFLAGS = \
|
||||
- -version-info $(libtool_VERSION) ${version_arg} -lm
|
||||
+ -version-info $(libtool_VERSION) ${version_arg} -lm -Wc,-nostdlib
|
||||
|
||||
|
||||
# Use special rules for the deprecated source files so that they find
|
||||
--- x/libstdcxx/libstdc++-v3/libsupc++/unwind-cxx.h
|
||||
+++ y/libstdcxx/libstdc++-v3/libsupc++/unwind-cxx.h
|
||||
@@ -38,7 +38,7 @@
|
||||
#include <typeinfo>
|
||||
#include <exception>
|
||||
#include <cstddef>
|
||||
-#include "unwind.h"
|
||||
+#include "unwind-generic.h"
|
||||
|
||||
#pragma GCC visibility push(default)
|
||||
|
||||
@@ -133,7 +133,7 @@ extern "C" void __cxa_bad_typeid ();
|
||||
// throws, and if bad_exception needs to be thrown. Called from the
|
||||
// compiler.
|
||||
extern "C" void __cxa_call_unexpected (void *) __attribute__((noreturn));
|
||||
-extern "C" void __cxa_call_terminate (void*) __attribute__((noreturn));
|
||||
+extern "C" void __cxa_call_terminate(_Unwind_Exception* ue_header);
|
||||
|
||||
#ifdef __ARM_EABI_UNWINDER__
|
||||
// Arm EABI specified routines.
|
||||
--- x/libstdcxx/libstdc++-v3/include/ext/bitmap_allocator.h
|
||||
+++ y/libstdcxx/libstdc++-v3/include/ext/bitmap_allocator.h
|
||||
@@ -549,6 +549,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
*/
|
||||
class free_list
|
||||
{
|
||||
+ public:
|
||||
typedef size_t* value_type;
|
||||
typedef __detail::__mini_vector<value_type> vector_type;
|
||||
typedef vector_type::iterator iterator;
|
||||
--- x/libstdcxx/libstdc++-v3/include/ext/ropeimpl.h
|
||||
+++ y/libstdcxx/libstdc++-v3/include/ext/ropeimpl.h
|
||||
@@ -433,7 +433,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
{
|
||||
size_t __old_len = __r->_M_size;
|
||||
_CharT* __new_data = (_CharT*)
|
||||
- _Data_allocate(_S_rounded_up_size(__old_len + __len));
|
||||
+ _Base::_Data_allocate(_S_rounded_up_size(__old_len + __len));
|
||||
_RopeLeaf* __result;
|
||||
|
||||
uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
|
||||
@@ -817,7 +817,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
if (__result_len > __lazy_threshold)
|
||||
goto lazy;
|
||||
__section = (_CharT*)
|
||||
- _Data_allocate(_S_rounded_up_size(__result_len));
|
||||
+ _Base::_Data_allocate(_S_rounded_up_size(__result_len));
|
||||
try
|
||||
{ (*(__f->_M_fn))(__start, __result_len, __section); }
|
||||
catch(...)
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
--- gcc-5666.3/gcc/toplev.h
|
||||
+++ gcc-5666.3/gcc/toplev.h
|
||||
@@ -151,6 +151,8 @@
|
||||
/* Return true iff flags are set as if -ffast-math. */
|
||||
extern bool fast_math_flags_set_p (void);
|
||||
|
||||
+#if GCC_VERSION < 3004
|
||||
+
|
||||
/* Return log2, or -1 if not exact. */
|
||||
extern int exact_log2 (unsigned HOST_WIDE_INT);
|
||||
|
||||
@@ -158,7 +160,7 @@
|
||||
extern int floor_log2 (unsigned HOST_WIDE_INT);
|
||||
|
||||
/* Inline versions of the above for speed. */
|
||||
-#if GCC_VERSION >= 3004
|
||||
+#else /* GCC_VERSION < 3004 */
|
||||
# if HOST_BITS_PER_WIDE_INT == HOST_BITS_PER_LONG
|
||||
# define CLZ_HWI __builtin_clzl
|
||||
# define CTZ_HWI __builtin_ctzl
|
||||
@@ -172,18 +172,18 @@
|
||||
# define CTZ_HWI __builtin_ctz
|
||||
# endif
|
||||
|
||||
-extern inline int
|
||||
+static inline int
|
||||
floor_log2 (unsigned HOST_WIDE_INT x)
|
||||
{
|
||||
return x ? HOST_BITS_PER_WIDE_INT - 1 - (int) CLZ_HWI (x) : -1;
|
||||
}
|
||||
|
||||
-extern inline int
|
||||
+static inline int
|
||||
exact_log2 (unsigned HOST_WIDE_INT x)
|
||||
{
|
||||
return x == (x & -x) && x ? (int) CTZ_HWI (x) : -1;
|
||||
}
|
||||
-#endif /* GCC_VERSION >= 3004 */
|
||||
+#endif /* GCC_VERSION < 3004 */
|
||||
|
||||
/* Functions used to get and set GCC's notion of in what directory
|
||||
compilation was started. */
|
||||
--- gcc-5666.3/gcc/toplev.c
|
||||
+++ gcc-5666.3/gcc/toplev.c
|
||||
@@ -555,7 +555,7 @@
|
||||
for floor_log2 and exact_log2; see toplev.h. That construct, however,
|
||||
conflicts with the ISO C++ One Definition Rule. */
|
||||
|
||||
-#if GCC_VERSION < 3004 || !defined (__cplusplus)
|
||||
+#if GCC_VERSION < 3004
|
||||
|
||||
/* Given X, an unsigned number, return the largest int Y such that 2**Y <= X.
|
||||
If X is 0, return -1. */
|
||||
@@ -607,7 +607,7 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-#endif /* GCC_VERSION < 3004 || !defined (__cplusplus) */
|
||||
+#endif /* GCC_VERSION < 3004 */
|
||||
|
||||
/* Handler for fatal signals, such as SIGSEGV. These are transformed
|
||||
into ICE messages, which is much more user friendly. In case the
|
|
@ -1,99 +0,0 @@
|
|||
diff -ruN gcc-4.1.0/gcc/Makefile.in gcc-4.1.0.new/gcc/Makefile.in
|
||||
--- gcc-4.1.0/gcc/Makefile.in 2006-02-16 16:23:24.000000000 +0100
|
||||
+++ gcc-4.1.0.new/gcc/Makefile.in 2006-03-01 18:55:12.000000000 +0100
|
||||
@@ -219,7 +219,7 @@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
# These exists to be overridden by the x-* and t-* files, respectively.
|
||||
-X_CFLAGS =
|
||||
+X_CFLAGS = $(NIX_EXTRA_CFLAGS) $(NIX_EXTRA_LDFLAGS)
|
||||
T_CFLAGS =
|
||||
|
||||
X_CPPFLAGS =
|
||||
@@ -383,7 +383,11 @@
|
||||
MD5_H = $(srcdir)/../include/md5.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
-NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
||||
+# Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
|
||||
+# `fixinc' from fixing header files in /usr/include. However,
|
||||
+# NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
|
||||
+# it to some dummy directory.
|
||||
+NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
@@ -395,7 +399,7 @@
|
||||
STMP_FIXINC = @STMP_FIXINC@
|
||||
|
||||
# Test to see whether <limits.h> exists in the system header files.
|
||||
-LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
|
||||
+LIMITS_H_TEST = true
|
||||
|
||||
# Directory for prefix to system directories, for
|
||||
# each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
|
||||
@@ -3002,7 +3006,7 @@
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
- -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
|
||||
+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
@TARGET_SYSTEM_ROOT_DEFINE@
|
||||
|
||||
diff -ruN gcc-4.1.0/ltcf-cxx.sh gcc-4.1.0.new/ltcf-cxx.sh
|
||||
--- gcc-4.1.0/ltcf-cxx.sh 2005-07-16 04:30:53.000000000 +0200
|
||||
+++ gcc-4.1.0.new/ltcf-cxx.sh 2006-03-01 18:58:15.000000000 +0100
|
||||
@@ -989,7 +989,7 @@
|
||||
# the conftest object file.
|
||||
pre_test_object_deps_done=no
|
||||
|
||||
- for p in `eval $output_verbose_link_cmd`; do
|
||||
+ for p in `true`; do
|
||||
|
||||
case $p in
|
||||
|
||||
diff -ruN gcc-4.1.0/ltconfig gcc-4.1.0.new/ltconfig
|
||||
--- gcc-4.1.0/ltconfig 2005-07-16 04:30:53.000000000 +0200
|
||||
+++ gcc-4.1.0.new/ltconfig 2006-03-01 18:59:58.000000000 +0100
|
||||
@@ -2322,6 +2322,11 @@
|
||||
# A language-specific compiler.
|
||||
CC=$CC
|
||||
|
||||
+# Ugly hack to get libmudflap (and possibly other libraries) to build.
|
||||
+# Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
|
||||
+# to Glibc gets lost. Here we forcibly add it to any invocation.
|
||||
+CC="\$CC $NIX_EXTRA_LDFLAGS"
|
||||
+
|
||||
# Is the compiler the GNU C compiler?
|
||||
with_gcc=$with_gcc
|
||||
|
||||
diff -ruN gcc-4.1.0/Makefile.in gcc-4.1.0.new/Makefile.in
|
||||
--- gcc-4.1.0/Makefile.in 2005-12-15 15:02:02.000000000 +0100
|
||||
+++ gcc-4.1.0.new/Makefile.in 2006-03-01 19:41:04.000000000 +0100
|
||||
@@ -286,7 +286,7 @@
|
||||
WINDRES = @WINDRES@
|
||||
|
||||
CFLAGS = @CFLAGS@
|
||||
-LDFLAGS =
|
||||
+LDFLAGS = $(NIX_EXTRA_LDFLAGS)
|
||||
LIBCFLAGS = $(CFLAGS)
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
|
||||
@@ -329,12 +329,12 @@
|
||||
# CFLAGS will be just -g. We want to ensure that TARGET libraries
|
||||
# (which we know are built with gcc) are built with optimizations so
|
||||
# prepend -O2 when setting CFLAGS_FOR_TARGET.
|
||||
-CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
+CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(NIX_EXTRA_CFLAGS)
|
||||
SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@
|
||||
-CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET)
|
||||
+CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) $(NIX_EXTRA_CFLAGS)
|
||||
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
-LDFLAGS_FOR_TARGET =
|
||||
+LDFLAGS_FOR_TARGET = $(NIX_EXTRA_LDFLAGS)
|
||||
PICFLAG_FOR_TARGET =
|
||||
|
||||
# ------------------------------------
|
|
@ -1,21 +0,0 @@
|
|||
diff -rc gcc-orig/Makefile.in gcc-4.1.1/Makefile.in
|
||||
*** gcc-orig/Makefile.in Wed Jun 21 13:40:23 2006
|
||||
--- gcc-4.1.1/Makefile.in Wed Jun 21 14:19:44 2006
|
||||
***************
|
||||
*** 213,219 ****
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
--- 213,220 ----
|
||||
RAW_CXX_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
||||
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
|
||||
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX; \
|
||||
! CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
|
||||
|
||||
NORMAL_TARGET_EXPORTS = \
|
||||
$(BASE_TARGET_EXPORTS) \
|
|
@ -81,6 +81,7 @@ stdenv.mkDerivation {
|
|||
installPhase = ''
|
||||
export CC=cc
|
||||
mkdir -p "$out/bin"
|
||||
unset GOPATH
|
||||
export GOROOT="$(pwd)/"
|
||||
export GOBIN="$out/bin"
|
||||
export PATH="$GOBIN:$PATH"
|
||||
|
@ -99,7 +100,10 @@ stdenv.mkDerivation {
|
|||
cp ./misc/emacs/* $out/share/emacs/site-lisp/
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
branch = "1.3";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = "BSD";
|
||||
|
|
|
@ -95,7 +95,10 @@ stdenv.mkDerivation {
|
|||
go test -v $TOOL_ROOT/cover $TOOL_ROOT/vet # $TOOL_ROOT/godoc
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
meta = {
|
||||
branch = "1.4";
|
||||
homepage = http://golang.org/;
|
||||
description = "The Go Programming language";
|
||||
license = "BSD";
|
||||
|
|
|
@ -1,49 +1,23 @@
|
|||
{ stdenv, lib, go_1_3, fetchFromGitHub }:
|
||||
{ lib, goPackages, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
goDeps = [
|
||||
{
|
||||
root = "github.com/mitchellh/gox";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "gox";
|
||||
rev = "c7329055e2aeb253a947e5cc876586ff4ca19199";
|
||||
sha256 = "0zhb88jjxqn3sdc4bpzvajqvgi9igp5gk03q12gaksaxhy2wl4jy";
|
||||
};
|
||||
}
|
||||
{
|
||||
root = "github.com/mitchellh/iochan";
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitchellh";
|
||||
repo = "iochan";
|
||||
rev = "b584a329b193e206025682ae6c10cdbe03b0cd77";
|
||||
sha256 = "1fcwdhfci41ibpng2j4c1bqfng578cwzb3c00yw1lnbwwhaq9r6b";
|
||||
};
|
||||
}
|
||||
];
|
||||
sources = stdenv.mkDerivation rec {
|
||||
name = "go-deps";
|
||||
buildCommand =
|
||||
lib.concatStrings
|
||||
(map (dep: ''
|
||||
mkdir -p $out/src/`dirname ${dep.root}`
|
||||
ln -s ${dep.src} $out/src/${dep.root}
|
||||
'') goDeps);
|
||||
with goPackages;
|
||||
|
||||
buildGoPackage rec {
|
||||
rev = "c7329055e2aeb253a947e5cc876586ff4ca19199";
|
||||
name = "gox-${lib.strings.substring 0 7 rev}";
|
||||
goPackagePath = "github.com/mitchellh/gox";
|
||||
src = fetchFromGitHub {
|
||||
inherit rev;
|
||||
owner = "mitchellh";
|
||||
repo = "gox";
|
||||
sha256 = "0zhb88jjxqn3sdc4bpzvajqvgi9igp5gk03q12gaksaxhy2wl4jy";
|
||||
};
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "gox";
|
||||
buildInputs = [ iochan ];
|
||||
|
||||
src = sources;
|
||||
propagatedBuildInputs = [ go ];
|
||||
|
||||
propagatedBuildInputs = [ go_1_3 ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
export GOPATH=$src
|
||||
go build -v -o $out/bin/gox github.com/mitchellh/gox
|
||||
'';
|
||||
dontInstallSrc = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple, no-frills tool for Go cross compilation that behaves a lot like standard go build";
|
||||
|
|
5
pkgs/development/compilers/go/setup-hook.sh
Normal file
5
pkgs/development/compilers/go/setup-hook.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
addToGoPath() {
|
||||
addToSearchPath GOPATH $1/share/go
|
||||
}
|
||||
|
||||
envHooks=(${envHooks[@]} addToGoPath)
|
|
@ -21,6 +21,11 @@ stdenv.mkDerivation {
|
|||
|
||||
patches = [ ./clang-purity.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e 's/Args.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/Tools.cpp
|
||||
sed -i -e 's/DriverArgs.hasArg(options::OPT_nostdlibinc)/true/' lib/Driver/ToolChains.cpp
|
||||
'';
|
||||
|
||||
# Clang expects to find LLVMgold in its own prefix
|
||||
# Clang expects to find sanitizer libraries in its own prefix
|
||||
postInstall = ''
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
diff -ru -x '*~' libcxxabi-orig/lib/buildit libcxxabi/lib/buildit
|
||||
--- libcxxabi-orig/lib/buildit 2014-09-18 16:54:14.000000000 +0200
|
||||
+++ libcxxabi/lib/buildit 2014-09-24 13:22:27.000000000 +0200
|
||||
@@ -51,12 +51,8 @@
|
||||
-dynamiclib -nodefaultlibs \
|
||||
-current_version ${RC_ProjectSourceVersion} \
|
||||
-compatibility_version 1 \
|
||||
- -install_name /usr/lib/libc++abi.dylib \
|
||||
+ -install_name $out/lib/libc++abi.dylib \
|
||||
-lSystem"
|
||||
- if [ -f "${SDKROOT}/usr/local/lib/libCrashReporterClient.a" ]
|
||||
- then
|
||||
- LDSHARED_FLAGS+=" -lCrashReporterClient"
|
||||
- fi
|
||||
;;
|
||||
*-*-mingw*)
|
||||
# FIXME: removing libgcc and libsupc++ dependencies means porting libcxxrt and LLVM/compiler-rt
|
|
@ -1,23 +1,29 @@
|
|||
{ stdenv, cmake, coreutils, fetchurl, libcxx, libunwind, llvm }:
|
||||
{ stdenv, cmake, fetchurl, libcxx, libunwind, llvm }:
|
||||
|
||||
let version = "3.5.0"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
let
|
||||
version = "3.5.0";
|
||||
cmakeLists = fetchurl {
|
||||
name = "CMakeLists.txt";
|
||||
url = "http://llvm.org/svn/llvm-project/libcxxabi/trunk/CMakeLists.txt?p=217324";
|
||||
sha256 = "10idgcbs4pcx6mjsbq1vjm8hzqqdk2p7k86cw9f473jmfyfwgf5j";
|
||||
};
|
||||
in stdenv.mkDerivation {
|
||||
name = "libc++abi-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://llvm.org/releases/${version}/libcxxabi-${version}.src.tar.xz";
|
||||
url = "http://llvm.org/releases/${version}/libcxxabi-${version}.src.tar.xz";
|
||||
sha256 = "1ndcpw3gfrzh7m1jac2qadhkrqgvb65cns69j9niydyj5mmbxijk";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_LINK = "-L${libunwind}/lib";
|
||||
|
||||
buildInputs = [ coreutils cmake llvm ];
|
||||
buildInputs = [ cmake ] ++ stdenv.lib.optional (!stdenv.isDarwin) libunwind;
|
||||
|
||||
postUnpack = ''
|
||||
unpackFile ${libcxx.src}
|
||||
export NIX_CFLAGS_COMPILE+=" -I${libunwind}/include -I$PWD/include"
|
||||
export cmakeFlags="-DLIBCXXABI_LIBCXX_INCLUDES=$(${coreutils}/bin/readlink -f libcxx-*)/include"
|
||||
unpackFile ${llvm.src}
|
||||
echo cp ${cmakeLists} libcxxabi-*/CMakeLists.txt
|
||||
cp ${cmakeLists} libcxxabi-*/CMakeLists.txt
|
||||
export NIX_CFLAGS_COMPILE+=" -I$PWD/include"
|
||||
export cmakeFlags="-DLLVM_PATH=$PWD/$(ls -d llvm-*) -DLIBCXXABI_LIBCXX_INCLUDES=$PWD/$(ls -d libcxx-*)/include"
|
||||
'' + stdenv.lib.optionalString stdenv.isDarwin ''
|
||||
export TRIPLE=x86_64-apple-darwin
|
||||
'';
|
||||
|
@ -38,7 +44,7 @@ stdenv.mkDerivation {
|
|||
else ''
|
||||
install -d -m 755 $out/include $out/lib
|
||||
install -m 644 lib/libc++abi.so.1.0 $out/lib
|
||||
install -m 644 ../include/cxxabi.h $out/include
|
||||
install -m 644 $src/include/cxxabi.h $out/include
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so
|
||||
ln -s libc++abi.so.1.0 $out/lib/libc++abi.so.1
|
||||
'';
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
diff -ru -x '*~' libcxxabi-orig/lib/buildit libcxxabi/lib/buildit
|
||||
--- libcxxabi-orig/lib/buildit 2014-09-18 16:54:14.000000000 +0200
|
||||
+++ libcxxabi/lib/buildit 2014-09-24 13:22:27.000000000 +0200
|
||||
@@ -70,7 +66,7 @@
|
||||
SOEXT=so
|
||||
LDSHARED_FLAGS="-o libc++abi.so.1.0 \
|
||||
-shared -nodefaultlibs -Wl,-soname,libc++abi.so.1 \
|
||||
- -lpthread -lrt -lc -lstdc++"
|
||||
+ -lpthread -lrt -lc"
|
||||
;;
|
||||
esac
|
||||
|
|
@ -38,7 +38,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
sourceRoot = name;
|
||||
|
||||
buildInputs = [ patchelf gmp ];
|
||||
buildInputs = [ gmp ] ++ stdenv.lib.optional stdenv.isLinux patchelf;
|
||||
|
||||
makeFlags = [ "all-no-docs" ];
|
||||
|
||||
|
@ -47,6 +47,12 @@ stdenv.mkDerivation rec {
|
|||
find . -type f | grep -v -e '\.tgz''$' | xargs sed -i "s@/usr/bin/env bash@$(type -p bash)@"
|
||||
|
||||
substituteInPlace $(pwd)/Makefile --replace '/bin/cp' $(type -p cp)
|
||||
substituteInPlace bin/mlton-script --replace gcc cc
|
||||
substituteInPlace bin/regression --replace gcc cc
|
||||
substituteInPlace lib/mlnlffi-lib/Makefile --replace gcc cc
|
||||
substituteInPlace mlnlffigen/gen-cppcmd --replace gcc cc
|
||||
substituteInPlace runtime/Makefile --replace gcc cc
|
||||
substituteInPlace ../${usr_prefix}/bin/mlton --replace gcc cc
|
||||
|
||||
# Fix paths in the binary distribution.
|
||||
BIN_DIST_DIR="$(pwd)/../${usr_prefix}"
|
||||
|
@ -91,8 +97,8 @@ stdenv.mkDerivation rec {
|
|||
# Path to gmp.h.
|
||||
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "-cc-opt '-O1 -fno-common'" "-cc-opt '-O1 -fno-common -I${gmp}/include'"
|
||||
|
||||
# Path to the same gcc used in the build; needed at runtime.
|
||||
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "gcc='gcc'" "gcc='"$(type -p gcc)"'"
|
||||
# Path to the same cc used in the build; needed at runtime.
|
||||
substituteInPlace $(pwd)/install/${usr_prefix}/bin/mlton --replace "gcc='gcc'" "gcc='"$(type -p cc)"'"
|
||||
|
||||
# Copy files to final positions.
|
||||
cp -r $(pwd)/install/${usr_prefix}/bin $out
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue