Add initial state
This commit is contained in:
parent
ebb8447e9d
commit
db4a620b14
4 changed files with 170 additions and 0 deletions
14
default.nix
Normal file
14
default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
self: super:
|
||||
|
||||
let
|
||||
inherit (super) callPackage;
|
||||
in
|
||||
rec {
|
||||
coreutils-advcpmv = callPackage ./pkgs/coreutils-advcpmv.nix {};
|
||||
|
||||
crosstool-ng = callPackage ./pkgs/crosstool-ng.nix {};
|
||||
|
||||
gnomeExtensions = (super.gnomeExtensions or {}) // {
|
||||
hide-activities = callPackage ./pkgs/gnome-shell-extensions/hide-activities.nix {};
|
||||
};
|
||||
}
|
30
pkgs/coreutils-advcpmv.nix
Normal file
30
pkgs/coreutils-advcpmv.nix
Normal file
|
@ -0,0 +1,30 @@
|
|||
{ fetchurl, coreutils }:
|
||||
|
||||
let
|
||||
fetchpatch = { file, sha256 }: builtins.fetchurl { url = "https://raw.githubusercontent.com/jarun/advcpmv/master/" + file; inherit sha256; };
|
||||
patches = {
|
||||
# nix-hash --type sha256 --base32 --flat *.patch
|
||||
"8.21" = fetchpatch { file = "advcpmv-0.5-8.21.patch"; sha256 = "15bhjj9f3wcnidxk3dsx1q0p74c2hyilf3zbjiy3wa3v166cgm79"; };
|
||||
"8.24" = fetchpatch { file = "advcpmv-0.6-8.24.patch"; sha256 = "1f059nqsjcs0m0di0z8y6q1p8j84br05rklamqvd32g0mllc5272"; };
|
||||
"8.25" = fetchpatch { file = "advcpmv-0.7-8.25.patch"; sha256 = "0zxflpvh1yg3j3v98h4w8j982dwc4vhan3rszklg59d1vjh38w1m"; };
|
||||
"8.28" = fetchpatch { file = "advcpmv-0.8-8.28.patch"; sha256 = "06vqih7jyb629s510yxjqdv9g6lfvd2dkha17zv0jwhdbsw9d0vg"; };
|
||||
"8.30" = fetchpatch { file = "advcpmv-0.8-8.30.patch"; sha256 = "06qw9amqd4wwwycjfscxybl1yxgg8x97rlfl32shcg2gamsxjm4r"; };
|
||||
"8.31" = fetchpatch { file = "advcpmv-0.8-8.31.patch"; sha256 = "0m0plga0m9q8rcg9s2sihxap31q1z64a74jaypvyjzy01gcmccnq"; };
|
||||
"8.32" = fetchpatch { file = "advcpmv-0.8-8.32.patch"; sha256 = "0iz7p5a8wihnydccb40cjvwxhl8sz9lm7xcd57aqsr1xl7158ki9"; };
|
||||
};
|
||||
in
|
||||
coreutils.overrideAttrs (old: {
|
||||
pname = "coreutils-advcpmv";
|
||||
|
||||
patches = (old.patches or []) ++ [
|
||||
(
|
||||
if patches ? ${old.version} then patches."${old.version}"
|
||||
else throw "Missing advcpmv patch for coreutils version ${old.version}."
|
||||
)
|
||||
];
|
||||
|
||||
# With the patch above, the test tests/misc/usage_vs_getopt.sh does not work anymore.
|
||||
postPatch = old.postPatch + ''
|
||||
sed '2i echo Skipping usage vs getopts test && exit 77' -i ./tests/misc/usage_vs_getopt.sh
|
||||
'';
|
||||
})
|
98
pkgs/crosstool-ng.nix
Normal file
98
pkgs/crosstool-ng.nix
Normal file
|
@ -0,0 +1,98 @@
|
|||
{ stdenv, fetchurl, lib, makeWrapper,
|
||||
withCurl ? false,
|
||||
withWget ? true,
|
||||
flex,
|
||||
gnumake,
|
||||
texinfo,
|
||||
unzip,
|
||||
help2man,
|
||||
file,
|
||||
gnused,
|
||||
which,
|
||||
libtool,
|
||||
ncurses,
|
||||
m4,
|
||||
gnugrep,
|
||||
coreutils,
|
||||
bison,
|
||||
binutils-unwrapped,
|
||||
bash,
|
||||
patch,
|
||||
gawk,
|
||||
autoconf,
|
||||
automake,
|
||||
python,
|
||||
gcc,
|
||||
wget,
|
||||
curl,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "crosstool-ng";
|
||||
version = "1.24.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://crosstool-ng.org/download/crosstool-ng/${pname}-${version}.tar.bz2";
|
||||
sha512 = "379e668365628f0ab359ae119213bed44960870093f64f0fbb12e92bbe2a3b82bfed77f5ab33f2e2f17c1977e7a63f2151c46ad8d0e6208220fb7fa8726fae33";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = [
|
||||
flex
|
||||
gnumake
|
||||
texinfo
|
||||
unzip
|
||||
help2man
|
||||
file
|
||||
which
|
||||
libtool
|
||||
m4
|
||||
ncurses
|
||||
gnugrep
|
||||
bison
|
||||
binutils-unwrapped
|
||||
bash
|
||||
patch
|
||||
gawk
|
||||
gnused
|
||||
gcc
|
||||
] ++ lib.optional withWget wget
|
||||
++ lib.optional withCurl curl;
|
||||
|
||||
preConfigure = ''
|
||||
export INSTALL="${coreutils}/bin/install"
|
||||
export GREP="${gnugrep}/bin/grep"
|
||||
export EGREP="${gnugrep}/bin/egrep"
|
||||
export SED="${gnused}/bin/sed"
|
||||
export YACC="${bison}/bin/bison -y"
|
||||
export OBJCOPY="${binutils-unwrapped}/bin/objcopy"
|
||||
export OBJDUMP="${binutils-unwrapped}/bin/objdump"
|
||||
export READELF="${binutils-unwrapped}/bin/readelf"
|
||||
export PATCH="${patch}/bin/patch"
|
||||
export BASH_SHELL="${bash}/bin/bash"
|
||||
export AWK="${gawk}/bin/gawk"
|
||||
export LIBTOOL="${libtool}/bin/libtool"
|
||||
export LIBTOOLIZE="${libtool}/bin/libtoolize"
|
||||
export AUTOCONF="${autoconf}/bin/autoconf"
|
||||
export AUTORECONF="${autoconf}/bin/autoreconf"
|
||||
export AUTOMAKE="${automake}/bin/automake"
|
||||
export M4="${m4}/bin/m4"
|
||||
export PYTHON="${python}/bin/python"
|
||||
export BISON="${bison}/bin/bison"
|
||||
export AR="${binutils-unwrapped}/bin/ar"
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram "$out/bin/ct-ng" \
|
||||
--prefix PATH : "${lib.strings.makeBinPath [ binutils-unwrapped m4 gcc ]}" \
|
||||
${lib.optionalString withWget "--set-default CT_WGET '${wget}/bin/wget'"} \
|
||||
${lib.optionalString withCurl "--set-default CT_CURL '${curl}/bin/curl'"}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A versatile (cross-)toolchain generator";
|
||||
homepage = "https://crosstool-ng.github.io/";
|
||||
license = licenses.gpl2;
|
||||
};
|
||||
}
|
28
pkgs/gnome-shell-extensions/hide-activities.nix
Normal file
28
pkgs/gnome-shell-extensions/hide-activities.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "hide-activities";
|
||||
version = "1.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "richard-fisher";
|
||||
repo = "hide-activities";
|
||||
rev = "5177b0152e4d38e2ccc8f5b632d973cddfbf69ca";
|
||||
sha256 = "0r9gcmk3hlw7z6pm1p517mygzr4wyycmsg8kpnsk2ggfi6xjiw3z";
|
||||
};
|
||||
|
||||
uuid = "hide-activities-button@gnome-shell-extensions.bookmarkd.xyz";
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/gnome-shell/extensions/${uuid}
|
||||
cp metadata.json extension.js $out/share/gnome-shell/extensions/${uuid}
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Hides the Activities button on the panel";
|
||||
homepage = "https://github.com/richard-fisher/hide-activities";
|
||||
license = licenses.gpl3;
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue