Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / dogtail / nix-support.patch
blobe8a65bbc87bef83a970a7ca501f59119ea4d997f
1 --- a/dogtail/distro.py
2 +++ b/dogtail/distro.py
3 @@ -233,6 +233,11 @@
4 PackageDb.__init__(self)
7 +class _NixPackageDb(PackageDb): # pragma: no cover
8 + def __init__(self):
9 + PackageDb.__init__(self)
12 class JhBuildPackageDb(PackageDb): # pragma: no cover
13 def __init__(self):
14 PackageDb.__init__(self)
15 @@ -324,6 +329,11 @@
16 self.packageDb = _SolarisPackageDb()
19 +class Nix(Distro): # pragma: no cover
20 + def __init__(self):
21 + self.packageDb = _NixPackageDb()
24 class JHBuild(Distro): # pragma: no cover
25 def __init__(self):
26 self.packageDb = JhBuildPackageDb()
27 @@ -358,6 +368,8 @@
28 elif os.path.exists("/etc/release") and \
29 re.match(".*Solaris", open("/etc/release").readline()): # pragma: no cover
30 distro = Solaris() # pragma: no cover
31 + elif os.path.exists("/nix/store"): # pragma: no cover
32 + distro = Nix() # pragma: no cover
33 elif os.path.exists("/etc/os-release") and \
34 re.match(".*GNOME-Continuous", open("/etc/os-release").readline()): # pragma: no cover
35 distro = GnomeContinuous() # pragma: no cover