mirror of
https://github.com/kmein/niveum
synced 2026-03-17 10:41:06 +01:00
modularize colorscheming and more
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
{ writeDashBin, font }:
|
||||
writeDashBin "font-size" ''
|
||||
{ writeShellScriptBin, font }:
|
||||
writeShellScriptBin "font-size" ''
|
||||
set -efu
|
||||
|
||||
# set_font NORMAL_FONT BOLD_FONT
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ writeDashBin, gnused, curl, pandoc }:
|
||||
writeDashBin "genius" ''
|
||||
{ writeShellScriptBin, gnused, curl, pandoc }:
|
||||
writeShellScriptBin "genius" ''
|
||||
test $# -eq 2 || (
|
||||
echo "usage: $0 <artist> <song>"
|
||||
exit 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ writeDashBin, wget, curl, jq }:
|
||||
writeDashBin "instaget" ''
|
||||
{ writeShellScriptBin, wget, curl, jq }:
|
||||
writeShellScriptBin "instaget" ''
|
||||
for url in "$@"; do
|
||||
${curl}/bin/curl -s "$url" \
|
||||
| grep display_url \
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
{ writeDashBin }:
|
||||
writeDashBin "n" ''nix-shell -p "$1" --run "''${2:-$1}"''
|
||||
{ writeShellScriptBin }:
|
||||
writeShellScriptBin "n" ''nix-shell -p "$1" --run "''${2:-$1}"''
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ writeDashBin, nix-prefetch-git, jq }:
|
||||
writeDashBin "nix-git" ''
|
||||
{ writeShellScriptBin, nix-prefetch-git, jq }:
|
||||
writeShellScriptBin "nix-git" ''
|
||||
${nix-prefetch-git}/bin/nix-prefetch-git "$@" 2> /dev/null | ${jq}/bin/jq -r '"rev = \"\(.rev)\";\nsha256 = \"\(.sha256)\";"'
|
||||
''
|
||||
|
||||
21
packages/todoist.nix
Normal file
21
packages/todoist.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ buildGoModule, fetchFromGitHub, lib }:
|
||||
buildGoModule rec {
|
||||
name = "todoist-${version}";
|
||||
version = "master";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sachaos";
|
||||
repo = "todoist";
|
||||
rev = "8c17d7ebf9be78cce24414b5aa3d9c8f1098e506";
|
||||
sha256 = "1r5kn5sx9g9rvx78cqfh19mqwf7370vk102x1n062whryk1j3562";
|
||||
};
|
||||
|
||||
modSha256 = "09n6abyaqwz4zcdz8934rvpbxhp4v2nmm5v739kkcc98c3h93i64";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Todoist CLI Client";
|
||||
homepage = "https://github.com/sachaos/todoist";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
|
||||
{ stdenv, buildGoPackage, fetchgit, fetchhg, fetchbzr, fetchsvn }:
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "todoist-unstable-${version}";
|
||||
version = "2018-11-09";
|
||||
rev = "4db9c55408d408ce8385ac6e845b83f320c45c28";
|
||||
|
||||
goPackagePath = "github.com/sachaos/todoist";
|
||||
|
||||
src = fetchgit {
|
||||
inherit rev;
|
||||
url = "https://github.com/sachaos/todoist";
|
||||
sha256 = "1697mfq7ajr938ps387hj689k7s93274xlfyns1lr4gw1mfpxhzc";
|
||||
};
|
||||
|
||||
goDeps = ./deps.nix;
|
||||
|
||||
# TODO: add metadata https://nixos.org/nixpkgs/manual/#sec-standard-meta-attributes
|
||||
meta = {
|
||||
};
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
# This file was generated by https://github.com/kamilchm/go2nix v1.3.0
|
||||
[
|
||||
{
|
||||
goPackagePath = "github.com/fatih/color";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/fatih/color";
|
||||
rev = "3f9d52f7176a6927daacff70a3e8d1dc2025c53e";
|
||||
sha256 = "165ww24x6ba47ji4j14mp3f006ksnmi53ws9280pgd2zcw91nbn8";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/fsnotify/fsnotify";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/fsnotify/fsnotify";
|
||||
rev = "ccc981bf80385c528a65fbfdd49bf2d8da22aa23";
|
||||
sha256 = "0hcrfmiyx27izac3v0ii0qq2kfjvhr9ma1i79hrl6a6y2ayagzz7";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/hashicorp/hcl";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/hashicorp/hcl";
|
||||
rev = "65a6292f0157eff210d03ed1bf6c59b190b8b906";
|
||||
sha256 = "00qgmygfa4vgf9v3lpz4vp1ca1hcfcxnjqjrvp6z4jjklc8x4mqf";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/magiconair/properties";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/magiconair/properties";
|
||||
rev = "7c38529aac7222391b7a2661365177a97e21b998";
|
||||
sha256 = "0g5jrpjnp16x2sw6ifg6dx24grcvsmfyxkrgnlp1cw06075k90dm";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/mitchellh/mapstructure";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/mitchellh/mapstructure";
|
||||
rev = "3536a929edddb9a5b34bd6861dc4a9647cb459fe";
|
||||
sha256 = "03bpv28jz9zhn4947saqwi328ydj7f6g6pf1m2d4m5zdh5jlfkrr";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/pelletier/go-toml";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/pelletier/go-toml";
|
||||
rev = "27c6b39a135b7dc87a14afb068809132fb7a9a8f";
|
||||
sha256 = "13ldxh43xf4prmcrjzriz3gxpnijpqlzrgyhh7bnkj7lkhryfpk9";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/pkg/browser";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/pkg/browser";
|
||||
rev = "0a3d74bf9ce488f035cf5bc36f753a711bc74334";
|
||||
sha256 = "0lv6kwvm31n79mh14a63zslaf4l9bspi2q0i8i9im4njfl42iv1c";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/satori/uuid";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/satori/uuid";
|
||||
rev = "b2ce2384e17bbe0c6d34077efa39dbab3e09123b";
|
||||
sha256 = "1yz4cx02377ijlf8mnn84j1dcmlwh8ncx7y3kw1zg2qw0z4x119c";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/spf13/afero";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/afero";
|
||||
rev = "a5d6946387efe7d64d09dcba68cdd523dc1273a3";
|
||||
sha256 = "0v1k07c2nn2nx7dhj9q03faq5hqjgc94v3xv3rhhld5b9i7ddjbd";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/spf13/cast";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/cast";
|
||||
rev = "8c9545af88b134710ab1cd196795e7f2388358d7";
|
||||
sha256 = "0xq1ffqj8y8h7dcnm0m9lfrh0ga7pssnn2c1dnr09chqbpn4bdc5";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/spf13/jwalterweatherman";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/jwalterweatherman";
|
||||
rev = "94f6ae3ed3bceceafa716478c5fbf8d29ca601a1";
|
||||
sha256 = "1ywmkwci5zyd88ijym6f30fj5c0k2yayxarkmnazf5ybljv50q7b";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/spf13/pflag";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/pflag";
|
||||
rev = "24fa6976df40757dce6aea913e7b81ade90530e1";
|
||||
sha256 = "0rf6prz6gl0l1b3wijzdgq887cdwigvzxvz6gqbm5l8pkq3fx1m9";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/spf13/viper";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/spf13/viper";
|
||||
rev = "6d33b5a963d922d182c91e8a1c88d81fd150cfd4";
|
||||
sha256 = "1190mg04718r03qriav99sf4kx2n7wdgr8vdni15f74bpbzrdjrl";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "github.com/urfave/cli";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://github.com/urfave/cli";
|
||||
rev = "b67dcf995b6a7b7f14fad5fcb7cc5441b05e814b";
|
||||
sha256 = "0n5vq4nydlhb7w12jiwphvxqdy4jwpxc3zwlxyhf05lq1nxfb56h";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "golang.org/x/sys";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/sys";
|
||||
rev = "7fbe1cd0fcc20051e1fcb87fbabec4a1bacaaeba";
|
||||
sha256 = "0y49s4kazign9nsw2x3h39cgs14lqi57m4hrka26w49z8a1xdyc6";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "golang.org/x/text";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://go.googlesource.com/text";
|
||||
rev = "e6919f6577db79269a6443b9dc46d18f2238fb5d";
|
||||
sha256 = "1p830sa7zqv4vzan3sn34qgfzc8466glv5ln2w6la96yw70wwky3";
|
||||
};
|
||||
}
|
||||
{
|
||||
goPackagePath = "gopkg.in/yaml.v2";
|
||||
fetch = {
|
||||
type = "git";
|
||||
url = "https://gopkg.in/yaml.v2";
|
||||
rev = "51d6538a90f86fe93ac480b35f37b2be17fef232";
|
||||
sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa";
|
||||
};
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,4 @@
|
||||
{ writeDashBin, curl, jq }:
|
||||
writeDashBin "wttr" ''
|
||||
{ writeShellScriptBin, curl, jq }:
|
||||
writeShellScriptBin "wttr" ''
|
||||
${curl}/bin/curl -s -H "Accept-Language: ''${LANG%_*}" --compressed "wttr.in/''${1-"@$(${curl}/bin/curl -s ipinfo.io | ${jq}/bin/jq -r .ip)"}?0"
|
||||
''
|
||||
|
||||
Reference in New Issue
Block a user