diff --git a/.gitignore b/.gitignore index f393974..eb5c067 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ .ghc* /github_token.txt -/nixpkgs-update.nix /packages-to-update.txt /result /result-doc diff --git a/nixpkgs-update.nix b/nixpkgs-update.nix new file mode 100644 index 0000000..325b561 --- /dev/null +++ b/nixpkgs-update.nix @@ -0,0 +1,53 @@ +{ mkDerivation, aeson, base, bytestring, conduit, containers +, cryptohash-sha256, directory, doctest, errors, filepath, github +, hspec, hspec-discover, http-client, http-client-tls, http-conduit +, http-types, iso8601-time, lib, lifted-base, mtl +, neat-interpolation, optparse-applicative, parsec, parsers +, partial-order, polysemy, polysemy-plugin, regex-applicative-text +, servant, servant-client, sqlite-simple, template-haskell +, temporary, text, th-env, time, transformers, typed-process, unix +, unordered-containers, vector, versions, xdg-basedir, zlib +}: +mkDerivation { + pname = "nixpkgs-update"; + version = "0.4.0"; + src = ./.; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson base bytestring conduit containers cryptohash-sha256 + directory errors filepath github http-client http-client-tls + http-conduit http-types iso8601-time lifted-base mtl + neat-interpolation optparse-applicative parsec parsers + partial-order polysemy polysemy-plugin regex-applicative-text + servant servant-client sqlite-simple template-haskell temporary + text th-env time transformers typed-process unix + unordered-containers vector versions xdg-basedir zlib + ]; + executableHaskellDepends = [ + aeson base bytestring conduit containers cryptohash-sha256 + directory errors filepath github http-client http-client-tls + http-conduit http-types iso8601-time lifted-base mtl + neat-interpolation optparse-applicative parsec parsers + partial-order polysemy polysemy-plugin regex-applicative-text + servant servant-client sqlite-simple template-haskell temporary + text th-env time transformers typed-process unix + unordered-containers vector versions xdg-basedir zlib + ]; + testHaskellDepends = [ + aeson base bytestring conduit containers cryptohash-sha256 + directory doctest errors filepath github hspec hspec-discover + http-client http-client-tls http-conduit http-types iso8601-time + lifted-base mtl neat-interpolation optparse-applicative parsec + parsers partial-order polysemy polysemy-plugin + regex-applicative-text servant servant-client sqlite-simple + template-haskell temporary text th-env time transformers + typed-process unix unordered-containers vector versions xdg-basedir + zlib + ]; + testToolDepends = [ hspec-discover ]; + homepage = "https://github.com/ryantm/nixpkgs-update#readme"; + description = "Tool for semi-automatic updating of nixpkgs repository"; + license = lib.licenses.cc0; + mainProgram = "nixpkgs-update"; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index ba9d1d7..0c21131 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -31,13 +31,14 @@ let overrides = _: haskellPackages: { polysemy-plugin = pkgs.haskell.lib.dontCheck haskellPackages.polysemy-plugin; polysemy = pkgs.haskell.lib.dontCheck haskellPackages.polysemy; + http-api-data = pkgs.haskell.lib.doJailbreak haskellPackages.http-api-data; nixpkgs-update = pkgs.haskell.lib.justStaticExecutables ( pkgs.haskell.lib.failOnAllWarnings ( pkgs.haskell.lib.disableExecutableProfiling ( pkgs.haskell.lib.disableLibraryProfiling ( pkgs.haskell.lib.generateOptparseApplicativeCompletion "nixpkgs-update" ( - (haskellPackages.developPackage developPackageAttrs).overrideAttrs drvAttrs + (haskellPackages.callPackage ../nixpkgs-update.nix {}).overrideAttrs drvAttrs ) ) ) @@ -50,6 +51,7 @@ let nativeBuildInputs = with pkgs; [ cabal-install ghcid + haskellPackages.cabal2nix ]; packages = ps: [ ps.nixpkgs-update ]; shellHook = '' diff --git a/pkgs/nixpkgs-update.nix b/pkgs/nixpkgs-update.nix new file mode 100644 index 0000000..325b561 --- /dev/null +++ b/pkgs/nixpkgs-update.nix @@ -0,0 +1,53 @@ +{ mkDerivation, aeson, base, bytestring, conduit, containers +, cryptohash-sha256, directory, doctest, errors, filepath, github +, hspec, hspec-discover, http-client, http-client-tls, http-conduit +, http-types, iso8601-time, lib, lifted-base, mtl +, neat-interpolation, optparse-applicative, parsec, parsers +, partial-order, polysemy, polysemy-plugin, regex-applicative-text +, servant, servant-client, sqlite-simple, template-haskell +, temporary, text, th-env, time, transformers, typed-process, unix +, unordered-containers, vector, versions, xdg-basedir, zlib +}: +mkDerivation { + pname = "nixpkgs-update"; + version = "0.4.0"; + src = ./.; + isLibrary = true; + isExecutable = true; + libraryHaskellDepends = [ + aeson base bytestring conduit containers cryptohash-sha256 + directory errors filepath github http-client http-client-tls + http-conduit http-types iso8601-time lifted-base mtl + neat-interpolation optparse-applicative parsec parsers + partial-order polysemy polysemy-plugin regex-applicative-text + servant servant-client sqlite-simple template-haskell temporary + text th-env time transformers typed-process unix + unordered-containers vector versions xdg-basedir zlib + ]; + executableHaskellDepends = [ + aeson base bytestring conduit containers cryptohash-sha256 + directory errors filepath github http-client http-client-tls + http-conduit http-types iso8601-time lifted-base mtl + neat-interpolation optparse-applicative parsec parsers + partial-order polysemy polysemy-plugin regex-applicative-text + servant servant-client sqlite-simple template-haskell temporary + text th-env time transformers typed-process unix + unordered-containers vector versions xdg-basedir zlib + ]; + testHaskellDepends = [ + aeson base bytestring conduit containers cryptohash-sha256 + directory doctest errors filepath github hspec hspec-discover + http-client http-client-tls http-conduit http-types iso8601-time + lifted-base mtl neat-interpolation optparse-applicative parsec + parsers partial-order polysemy polysemy-plugin + regex-applicative-text servant servant-client sqlite-simple + template-haskell temporary text th-env time transformers + typed-process unix unordered-containers vector versions xdg-basedir + zlib + ]; + testToolDepends = [ hspec-discover ]; + homepage = "https://github.com/ryantm/nixpkgs-update#readme"; + description = "Tool for semi-automatic updating of nixpkgs repository"; + license = lib.licenses.cc0; + mainProgram = "nixpkgs-update"; +}