<?xml version="1.0" encoding="UTF-8"?>
<metadata xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm" packages="2">
<package type="rpm">
  <name>cabal-sort</name>
  <arch>src</arch>
  <version epoch="0" ver="0.1.2.1" rel="1.fc45"/>
  <checksum type="sha256" pkgid="YES">f99f43381711e044ff52e696bda967bb92105746a935ab9677335ed854b942a6</checksum>
  <summary>Topologically sort cabal packages</summary>
  <description>If you have a bunch of packages you may want to compile or recompile, then you
need an order of compilation that meets the dependencies. Given a number of
cabal package files, this program reads all those files and emits them
topologically sorted according to their dependencies. This way you can compile
many packages at once, say if a very low-level package has changed.

For compiling a couple of packages from their local darcs repositories in the
right order, you may run something like

&gt; for dir in `find . -name "*.cabal" | fgrep -v _darcs | xargs cabal-sort
--info=dir`; do (cd $dir &amp;&amp; cabal install); done

Note that cabal-install does this automatically since version 0.10 when you
call it will multiple directory names as arguments. However, when the
constraint solver in cabal-install fails you may still use cabal-sort for an
automated build.

For uploading a set of packages to Hackage in the right order you may run

&gt; for dir in `find . -name "*.cabal" | fgrep -v _darcs | xargs cabal-sort
--info=dir`; do (cd $dir &amp;&amp; rm dist/*.tar.gz &amp;&amp; cabal sdist &amp;&amp; cabal upload
dist/*.tar.gz); done

Sometimes you have to inspect a number of packages manually, e.g. in order to
adapt your packages to a new GHC version. In this case I found it useful to run

&gt; for dir in `find . -name "*.cabal" | fgrep -v _darcs | xargs cabal-sort
--info=dir`; do (cd $dir; bash); done

This way you start a local shell for every package. Then you can easily access
commands in the shell history that you already run for previous packages, e.g.
'editor *.cabal'. After you finished a package, you switch to the next package
simply by leaving the shell by calling 'exit'.

Problem 1: Given packages A, B, C, where C depends on B and B depends on A, and
you call

&gt; cabal-sort C.cabal A.cabal

then the emitted order of packages may be wrong, because cabal-sort does not
get to know the dependency of C on B. Even if the order is correct, B.cabal is
missing in the output and thus the list of cabal files cannot immediately be
used for a sequence of cabal-install runs.

Problem 2: We ignore flags and merge all dependencies. This may lead to
dependency cycles that cannot occur for any flag assignment.

You also have options '--parallel' and '--makefile' that support parallel
compilation. The first option is for manual parallelization and the second one
allows you to compile parallelly using 'make''s '-j'/'--jobs' option.

There is a second program called 'ghc-pkg-dep' that finds recursively all
packages that a set of packages depends on. Duplicates are eliminated and the
packages are given topologically sorted, such that you can use this for
recompilation of the packages. The packages must already be registered with
'ghc-pkg'.

&gt; ghc-pkg-dep pkgA-0.1 pkgB-2.3 pkgC-0.1.2

On GHC versions before 7.0 ghc-pkg runs quite slowly. In order to not get bored
you may run the program with '--verbose=2' option.

Related packages: 'rpmbuild-order'.</description>
  <packager></packager>
  <url>https://hackage.haskell.org/package/cabal-sort</url>
  <time file="1780752472" build="1780752444"/>
  <size package="76242" installed="62058" archive="63000"/>
  <location href="10573522-cabal-sort/cabal-sort-0.1.2.1-1.fc45.src.rpm"/>
  <format>
    <rpm:license>BSD-3-Clause</rpm:license>
    <rpm:vendor>Fedora Copr - user petersen</rpm:vendor>
    <rpm:group>Unspecified</rpm:group>
    <rpm:buildhost>aws-x86-64-reserved-prod-10924764-20260606-130319</rpm:buildhost>
    <rpm:sourcerpm></rpm:sourcerpm>
    <rpm:header-range start="4504" end="21687"/>
    <rpm:provides>
      <rpm:entry name="cabal-sort" flags="EQ" epoch="0" ver="0.1.2.1" rel="1.fc45"/>
    </rpm:provides>
    <rpm:requires>
      <rpm:entry name="ghc-Cabal-devel"/>
      <rpm:entry name="ghc-QuickCheck-devel"/>
      <rpm:entry name="ghc-base-devel"/>
      <rpm:entry name="ghc-bytestring-devel"/>
      <rpm:entry name="ghc-containers-devel"/>
      <rpm:entry name="ghc-deepseq-devel"/>
      <rpm:entry name="ghc-directory-devel"/>
      <rpm:entry name="ghc-explicit-exception-devel"/>
      <rpm:entry name="ghc-filepath-devel"/>
      <rpm:entry name="ghc-optparse-applicative-devel"/>
      <rpm:entry name="ghc-process-devel"/>
      <rpm:entry name="ghc-rpm-macros-extra"/>
      <rpm:entry name="ghc-semigroups-devel"/>
      <rpm:entry name="ghc-transformers-devel"/>
      <rpm:entry name="ghc-utility-ht-devel"/>
      <rpm:entry name="help2man"/>
    </rpm:requires>
  </format>
</package>
<package type="rpm">
  <name>cabal-sort</name>
  <arch>x86_64</arch>
  <version epoch="0" ver="0.1.2.1" rel="1.fc45"/>
  <checksum type="sha256" pkgid="YES">04c029143865cec71d7106c09e7fdb73d04d3e6e86cb8b07cc8ffc7daa58a0ff</checksum>
  <summary>Topologically sort cabal packages</summary>
  <description>If you have a bunch of packages you may want to compile or recompile, then you
need an order of compilation that meets the dependencies. Given a number of
cabal package files, this program reads all those files and emits them
topologically sorted according to their dependencies. This way you can compile
many packages at once, say if a very low-level package has changed.

For compiling a couple of packages from their local darcs repositories in the
right order, you may run something like

&gt; for dir in `find . -name "*.cabal" | fgrep -v _darcs | xargs cabal-sort
--info=dir`; do (cd $dir &amp;&amp; cabal install); done

Note that cabal-install does this automatically since version 0.10 when you
call it will multiple directory names as arguments. However, when the
constraint solver in cabal-install fails you may still use cabal-sort for an
automated build.

For uploading a set of packages to Hackage in the right order you may run

&gt; for dir in `find . -name "*.cabal" | fgrep -v _darcs | xargs cabal-sort
--info=dir`; do (cd $dir &amp;&amp; rm dist/*.tar.gz &amp;&amp; cabal sdist &amp;&amp; cabal upload
dist/*.tar.gz); done

Sometimes you have to inspect a number of packages manually, e.g. in order to
adapt your packages to a new GHC version. In this case I found it useful to run

&gt; for dir in `find . -name "*.cabal" | fgrep -v _darcs | xargs cabal-sort
--info=dir`; do (cd $dir; bash); done

This way you start a local shell for every package. Then you can easily access
commands in the shell history that you already run for previous packages, e.g.
'editor *.cabal'. After you finished a package, you switch to the next package
simply by leaving the shell by calling 'exit'.

Problem 1: Given packages A, B, C, where C depends on B and B depends on A, and
you call

&gt; cabal-sort C.cabal A.cabal

then the emitted order of packages may be wrong, because cabal-sort does not
get to know the dependency of C on B. Even if the order is correct, B.cabal is
missing in the output and thus the list of cabal files cannot immediately be
used for a sequence of cabal-install runs.

Problem 2: We ignore flags and merge all dependencies. This may lead to
dependency cycles that cannot occur for any flag assignment.

You also have options '--parallel' and '--makefile' that support parallel
compilation. The first option is for manual parallelization and the second one
allows you to compile parallelly using 'make''s '-j'/'--jobs' option.

There is a second program called 'ghc-pkg-dep' that finds recursively all
packages that a set of packages depends on. Duplicates are eliminated and the
packages are given topologically sorted, such that you can use this for
recompilation of the packages. The packages must already be registered with
'ghc-pkg'.

&gt; ghc-pkg-dep pkgA-0.1 pkgB-2.3 pkgC-0.1.2

On GHC versions before 7.0 ghc-pkg runs quite slowly. In order to not get bored
you may run the program with '--verbose=2' option.

Related packages: 'rpmbuild-order'.</description>
  <packager></packager>
  <url>https://hackage.haskell.org/package/cabal-sort</url>
  <time file="1780752473" build="1780752445"/>
  <size package="2093440" installed="15408102" archive="15410056"/>
  <location href="10573522-cabal-sort/cabal-sort-0.1.2.1-1.fc45.x86_64.rpm"/>
  <format>
    <rpm:license>BSD-3-Clause</rpm:license>
    <rpm:vendor>Fedora Copr - user petersen</rpm:vendor>
    <rpm:group>Unspecified</rpm:group>
    <rpm:buildhost>aws-x86-64-reserved-prod-10924764-20260606-130319</rpm:buildhost>
    <rpm:sourcerpm>cabal-sort-0.1.2.1-1.fc45.src.rpm</rpm:sourcerpm>
    <rpm:header-range start="4504" end="13437"/>
    <rpm:provides>
      <rpm:entry name="cabal-sort" flags="EQ" epoch="0" ver="0.1.2.1" rel="1.fc45"/>
      <rpm:entry name="cabal-sort(x86-64)" flags="EQ" epoch="0" ver="0.1.2.1" rel="1.fc45"/>
    </rpm:provides>
    <rpm:requires>
      <rpm:entry name="glibc" flags="GE" epoch="0" ver="2.43.9000" rel="19"/>
      <rpm:entry name="libffi.so.8()(64bit)"/>
      <rpm:entry name="libffi.so.8(LIBFFI_BASE_8.0)(64bit)"/>
      <rpm:entry name="libgmp.so.10()(64bit)"/>
      <rpm:entry name="libm.so.6()(64bit)"/>
      <rpm:entry name="libm.so.6(GLIBC_2.2.5)(64bit)"/>
      <rpm:entry name="libm.so.6(GLIBC_2.27)(64bit)"/>
      <rpm:entry name="libm.so.6(GLIBC_2.29)(64bit)"/>
      <rpm:entry name="libm.so.6(GLIBC_2.43)(64bit)"/>
      <rpm:entry name="libm.so.6(GLIBC_2.44)(64bit)"/>
      <rpm:entry name="libnuma.so.1()(64bit)"/>
      <rpm:entry name="libnuma.so.1(libnuma_1.1)(64bit)"/>
      <rpm:entry name="libnuma.so.1(libnuma_1.2)(64bit)"/>
      <rpm:entry name="rtld(GNU_HASH)"/>
      <rpm:entry name="libc.so.6(GLIBC_2.38)(64bit)"/>
    </rpm:requires>
    <file>/usr/bin/cabal-sort</file>
    <file>/usr/bin/ghc-pkg-dep</file>
  </format>
</package>
</metadata>