Merge pull request #105411 from AndersonTorres/wip-ucg
ucg: init at 20190225
This commit is contained in:
commit
881dee5284
@ -40,18 +40,18 @@ in
|
||||
bittorrent = handleTest ./bittorrent.nix {};
|
||||
bitwarden = handleTest ./bitwarden.nix {};
|
||||
blockbook-frontend = handleTest ./blockbook-frontend.nix {};
|
||||
buildkite-agents = handleTest ./buildkite-agents.nix {};
|
||||
boot = handleTestOn ["x86_64-linux"] ./boot.nix {}; # syslinux is unsupported on aarch64
|
||||
boot-stage1 = handleTest ./boot-stage1.nix {};
|
||||
borgbackup = handleTest ./borgbackup.nix {};
|
||||
buildbot = handleTest ./buildbot.nix {};
|
||||
buildkite-agents = handleTest ./buildkite-agents.nix {};
|
||||
caddy = handleTest ./caddy.nix {};
|
||||
cadvisor = handleTestOn ["x86_64-linux"] ./cadvisor.nix {};
|
||||
cage = handleTest ./cage.nix {};
|
||||
cagebreak = handleTest ./cagebreak.nix {};
|
||||
cassandra = handleTest ./cassandra.nix {};
|
||||
ceph-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {};
|
||||
ceph-multi-node = handleTestOn ["x86_64-linux"] ./ceph-multi-node.nix {};
|
||||
ceph-single-node = handleTestOn ["x86_64-linux"] ./ceph-single-node.nix {};
|
||||
certmgr = handleTest ./certmgr.nix {};
|
||||
cfssl = handleTestOn ["x86_64-linux"] ./cfssl.nix {};
|
||||
charliecloud = handleTest ./charliecloud.nix {};
|
||||
@ -59,9 +59,9 @@ in
|
||||
cjdns = handleTest ./cjdns.nix {};
|
||||
clickhouse = handleTest ./clickhouse.nix {};
|
||||
cloud-init = handleTest ./cloud-init.nix {};
|
||||
cockroachdb = handleTestOn ["x86_64-linux"] ./cockroachdb.nix {};
|
||||
codimd = handleTest ./codimd.nix {};
|
||||
consul = handleTest ./consul.nix {};
|
||||
cockroachdb = handleTestOn ["x86_64-linux"] ./cockroachdb.nix {};
|
||||
containers-bridge = handleTest ./containers-bridge.nix {};
|
||||
containers-custom-pkgs.nix = handleTest ./containers-custom-pkgs.nix {};
|
||||
containers-ephemeral = handleTest ./containers-ephemeral.nix {};
|
||||
@ -85,7 +85,6 @@ in
|
||||
dnscrypt-wrapper = handleTestOn ["x86_64-linux"] ./dnscrypt-wrapper {};
|
||||
doas = handleTest ./doas.nix {};
|
||||
docker = handleTestOn ["x86_64-linux"] ./docker.nix {};
|
||||
oci-containers = handleTestOn ["x86_64-linux"] ./oci-containers.nix {};
|
||||
docker-edge = handleTestOn ["x86_64-linux"] ./docker-edge.nix {};
|
||||
docker-registry = handleTest ./docker-registry.nix {};
|
||||
docker-tools = handleTestOn ["x86_64-linux"] ./docker-tools.nix {};
|
||||
@ -119,24 +118,23 @@ in
|
||||
fsck = handleTest ./fsck.nix {};
|
||||
ft2-clone = handleTest ./ft2-clone.nix {};
|
||||
gerrit = handleTest ./gerrit.nix {};
|
||||
gotify-server = handleTest ./gotify-server.nix {};
|
||||
grocy = handleTest ./grocy.nix {};
|
||||
gitdaemon = handleTest ./gitdaemon.nix {};
|
||||
gitea = handleTest ./gitea.nix {};
|
||||
gitlab = handleTest ./gitlab.nix {};
|
||||
gitolite = handleTest ./gitolite.nix {};
|
||||
gitolite-fcgiwrap = handleTest ./gitolite-fcgiwrap.nix {};
|
||||
glusterfs = handleTest ./glusterfs.nix {};
|
||||
gnome3-xorg = handleTest ./gnome3-xorg.nix {};
|
||||
gnome3 = handleTest ./gnome3.nix {};
|
||||
installed-tests = pkgs.recurseIntoAttrs (handleTest ./installed-tests {});
|
||||
gnome3-xorg = handleTest ./gnome3-xorg.nix {};
|
||||
go-neb = handleTest ./go-neb.nix {};
|
||||
gocd-agent = handleTest ./gocd-agent.nix {};
|
||||
gocd-server = handleTest ./gocd-server.nix {};
|
||||
go-neb = handleTest ./go-neb.nix {};
|
||||
google-oslogin = handleTest ./google-oslogin {};
|
||||
gotify-server = handleTest ./gotify-server.nix {};
|
||||
grafana = handleTest ./grafana.nix {};
|
||||
graphite = handleTest ./graphite.nix {};
|
||||
graylog = handleTest ./graylog.nix {};
|
||||
grocy = handleTest ./grocy.nix {};
|
||||
grub = handleTest ./grub.nix {};
|
||||
gvisor = handleTest ./gvisor.nix {};
|
||||
hadoop.hdfs = handleTestOn [ "x86_64-linux" ] ./hadoop/hdfs.nix {};
|
||||
@ -144,6 +142,8 @@ in
|
||||
handbrake = handleTestOn ["x86_64-linux"] ./handbrake.nix {};
|
||||
haproxy = handleTest ./haproxy.nix {};
|
||||
hardened = handleTest ./hardened.nix {};
|
||||
installed-tests = pkgs.recurseIntoAttrs (handleTest ./installed-tests {});
|
||||
oci-containers = handleTestOn ["x86_64-linux"] ./oci-containers.nix {};
|
||||
# 9pnet_virtio used to mount /nix partition doesn't support
|
||||
# hibernation. This test happens to work on x86_64-linux but
|
||||
# not on other platforms.
|
||||
@ -160,8 +160,8 @@ in
|
||||
ihatemoney = handleTest ./ihatemoney.nix {};
|
||||
incron = handleTest ./incron.nix {};
|
||||
influxdb = handleTest ./influxdb.nix {};
|
||||
initrd-network-ssh = handleTest ./initrd-network-ssh {};
|
||||
initrd-network-openvpn = handleTest ./initrd-network-openvpn {};
|
||||
initrd-network-ssh = handleTest ./initrd-network-ssh {};
|
||||
initrdNetwork = handleTest ./initrd-network.nix {};
|
||||
installer = handleTest ./installer.nix {};
|
||||
iodine = handleTest ./iodine.nix {};
|
||||
@ -201,8 +201,8 @@ in
|
||||
lxd-nftables = handleTest ./lxd-nftables.nix {};
|
||||
#logstash = handleTest ./logstash.nix {};
|
||||
lorri = handleTest ./lorri/default.nix {};
|
||||
magnetico = handleTest ./magnetico.nix {};
|
||||
magic-wormhole-mailbox-server = handleTest ./magic-wormhole-mailbox-server.nix {};
|
||||
magnetico = handleTest ./magnetico.nix {};
|
||||
mailcatcher = handleTest ./mailcatcher.nix {};
|
||||
mariadb-galera-mariabackup = handleTest ./mysql/mariadb-galera-mariabackup.nix {};
|
||||
mariadb-galera-rsync = handleTest ./mysql/mariadb-galera-rsync.nix {};
|
||||
@ -213,9 +213,9 @@ in
|
||||
metabase = handleTest ./metabase.nix {};
|
||||
minecraft = handleTest ./minecraft.nix {};
|
||||
minecraft-server = handleTest ./minecraft-server.nix {};
|
||||
minidlna = handleTest ./minidlna.nix {};
|
||||
miniflux = handleTest ./miniflux.nix {};
|
||||
minio = handleTest ./minio.nix {};
|
||||
minidlna = handleTest ./minidlna.nix {};
|
||||
misc = handleTest ./misc.nix {};
|
||||
moinmoin = handleTest ./moinmoin.nix {};
|
||||
mongodb = handleTest ./mongodb.nix {};
|
||||
@ -240,10 +240,10 @@ in
|
||||
ncdns = handleTest ./ncdns.nix {};
|
||||
ndppd = handleTest ./ndppd.nix {};
|
||||
neo4j = handleTest ./neo4j.nix {};
|
||||
specialisation = handleTest ./specialisation.nix {};
|
||||
netdata = handleTest ./netdata.nix {};
|
||||
networking.networkd = handleTest ./networking.nix { networkd = true; };
|
||||
networking.scripted = handleTest ./networking.nix { networkd = false; };
|
||||
specialisation = handleTest ./specialisation.nix {};
|
||||
# TODO: put in networking.nix after the test becomes more complete
|
||||
networkingProxy = handleTest ./networking-proxy.nix {};
|
||||
nextcloud = handleTest ./nextcloud {};
|
||||
@ -269,8 +269,8 @@ in
|
||||
openldap = handleTest ./openldap.nix {};
|
||||
opensmtpd = handleTest ./opensmtpd.nix {};
|
||||
openssh = handleTest ./openssh.nix {};
|
||||
openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
|
||||
openstack-image-metadata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).metadata or {};
|
||||
openstack-image-userdata = (handleTestOn ["x86_64-linux"] ./openstack-image.nix {}).userdata or {};
|
||||
orangefs = handleTest ./orangefs.nix {};
|
||||
os-prober = handleTestOn ["x86_64-linux"] ./os-prober.nix {};
|
||||
osrm-backend = handleTest ./osrm-backend.nix {};
|
||||
@ -280,6 +280,7 @@ in
|
||||
pam-u2f = handleTest ./pam-u2f.nix {};
|
||||
pantheon = handleTest ./pantheon.nix {};
|
||||
paperless = handleTest ./paperless.nix {};
|
||||
pdns-recursor = handleTest ./pdns-recursor.nix {};
|
||||
peerflix = handleTest ./peerflix.nix {};
|
||||
pgjwt = handleTest ./pgjwt.nix {};
|
||||
pgmanage = handleTest ./pgmanage.nix {};
|
||||
@ -339,9 +340,9 @@ in
|
||||
snapper = handleTest ./snapper.nix {};
|
||||
sogo = handleTest ./sogo.nix {};
|
||||
solr = handleTest ./solr.nix {};
|
||||
sonarr = handleTest ./sonarr.nix {};
|
||||
spacecookie = handleTest ./spacecookie.nix {};
|
||||
spike = handleTest ./spike.nix {};
|
||||
sonarr = handleTest ./sonarr.nix {};
|
||||
sslh = handleTest ./sslh.nix {};
|
||||
sssd = handleTestOn ["x86_64-linux"] ./sssd.nix {};
|
||||
sssd-ldap = handleTestOn ["x86_64-linux"] ./sssd-ldap.nix {};
|
||||
@ -358,13 +359,12 @@ in
|
||||
systemd-boot = handleTest ./systemd-boot.nix {};
|
||||
systemd-confinement = handleTest ./systemd-confinement.nix {};
|
||||
systemd-journal = handleTest ./systemd-journal.nix {};
|
||||
systemd-timesyncd = handleTest ./systemd-timesyncd.nix {};
|
||||
systemd-networkd-vrf = handleTest ./systemd-networkd-vrf.nix {};
|
||||
systemd-networkd = handleTest ./systemd-networkd.nix {};
|
||||
systemd-networkd-dhcpserver = handleTest ./systemd-networkd-dhcpserver.nix {};
|
||||
systemd-networkd-ipv6-prefix-delegation = handleTest ./systemd-networkd-ipv6-prefix-delegation.nix {};
|
||||
systemd-networkd-vrf = handleTest ./systemd-networkd-vrf.nix {};
|
||||
systemd-nspawn = handleTest ./systemd-nspawn.nix {};
|
||||
pdns-recursor = handleTest ./pdns-recursor.nix {};
|
||||
systemd-timesyncd = handleTest ./systemd-timesyncd.nix {};
|
||||
taskserver = handleTest ./taskserver.nix {};
|
||||
telegraf = handleTest ./telegraf.nix {};
|
||||
tiddlywiki = handleTest ./tiddlywiki.nix {};
|
||||
@ -372,15 +372,16 @@ in
|
||||
tinydns = handleTest ./tinydns.nix {};
|
||||
tor = handleTest ./tor.nix {};
|
||||
# traefik test relies on docker-containers
|
||||
trac = handleTest ./trac.nix {};
|
||||
traefik = handleTestOn ["x86_64-linux"] ./traefik.nix {};
|
||||
transmission = handleTest ./transmission.nix {};
|
||||
trac = handleTest ./trac.nix {};
|
||||
trilium-server = handleTestOn ["x86_64-linux"] ./trilium-server.nix {};
|
||||
trezord = handleTest ./trezord.nix {};
|
||||
trickster = handleTest ./trickster.nix {};
|
||||
trilium-server = handleTestOn ["x86_64-linux"] ./trilium-server.nix {};
|
||||
tuptime = handleTest ./tuptime.nix {};
|
||||
unbound = handleTest ./unbound.nix {};
|
||||
ucg = handleTest ./ucg.nix {};
|
||||
udisks2 = handleTest ./udisks2.nix {};
|
||||
unbound = handleTest ./unbound.nix {};
|
||||
unit-php = handleTest ./web-servers/unit-php.nix {};
|
||||
upnp = handleTest ./upnp.nix {};
|
||||
uwsgi = handleTest ./uwsgi.nix {};
|
||||
|
18
nixos/tests/ucg.nix
Normal file
18
nixos/tests/ucg.nix
Normal file
@ -0,0 +1,18 @@
|
||||
import ./make-test-python.nix ({ pkgs, ... }: {
|
||||
name = "ucg";
|
||||
meta = with pkgs.stdenv.lib.maintainers; {
|
||||
maintainers = [ AndersonTorres ];
|
||||
};
|
||||
|
||||
machine = { pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.ucg ];
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
machine.succeed("echo 'Lorem ipsum dolor sit amet\n2.7182818284590' > /tmp/foo")
|
||||
assert "dolor" in machine.succeed("ucg 'dolor' /tmp/foo")
|
||||
assert "Lorem" in machine.succeed("ucg --ignore-case 'lorem' /tmp/foo")
|
||||
machine.fail("ucg --word-regexp '2718' /tmp/foo")
|
||||
machine.fail("ucg 'pisum' /tmp/foo")
|
||||
'';
|
||||
})
|
40
pkgs/tools/text/ucg/default.nix
Normal file
40
pkgs/tools/text/ucg/default.nix
Normal file
@ -0,0 +1,40 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
, pkg-config
|
||||
, autoreconfHook
|
||||
, pcre
|
||||
, nixosTests
|
||||
}:
|
||||
|
||||
let
|
||||
pname = "ucg";
|
||||
version = "20190225";
|
||||
in stdenv.mkDerivation {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gvansickle";
|
||||
repo = pname;
|
||||
rev = "c3a67632f1e3f332bfb102f0db167f34a2e42da7";
|
||||
sha256 = "sha256-/wU1PmI4ejlv7gZzZNasgROYXFiDiIxE9BFoCo6+G5Y=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||
buildInputs = [ pcre ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/gvansickle/ucg/";
|
||||
description = "Grep-like tool for searching large bodies of source code";
|
||||
longDescription = ''
|
||||
UniversalCodeGrep (ucg) is an extremely fast grep-like tool specialized
|
||||
for searching large bodies of source code. It is intended to be largely
|
||||
command-line compatible with Ack, to some extent with ag, and where
|
||||
appropriate with grep. Search patterns are specified as PCRE regexes.
|
||||
'';
|
||||
license = licenses.gpl3Plus;
|
||||
maintainers = with maintainers; [ AndersonTorres ];
|
||||
platforms = with platforms; unix;
|
||||
};
|
||||
|
||||
passthru.tests = { inherit (nixosTests) ucg; };
|
||||
}
|
@ -4385,6 +4385,8 @@ in
|
||||
inherit (darwin.apple_sdk.frameworks) Security;
|
||||
};
|
||||
|
||||
ucg = callPackage ../tools/text/ucg { };
|
||||
|
||||
grive2 = callPackage ../tools/filesystems/grive2 { };
|
||||
|
||||
groff = callPackage ../tools/text/groff {
|
||||
|
Loading…
Reference in New Issue
Block a user