Comments (18)
komposition is now in Homebrew
from komposition.
Yes, that's the one.
from komposition.
Indeed, it would be awesome! I haven't written such formulas before, but maybe someone with experience would like to help. Could be done from precompiled binaries from CI.
from komposition.
I've done it before, the base case is very easy. You basically create a generic repo that contains homebrew formulas that look like this: https://github.com/2mol/homebrew-tools/blob/master/pboy.rb.
In your case installation would then be brew install owickstrom/tools/komposition
("tools" can also be something else of your choosing).
Two things for your case that I see as potential roadblocks:
- From CI like you said won't work, since you point to a download URL in the homebrew formula. I see you don't have releases yet.
- I'd check how to get the dependencies defined properly, especially if passing the flag in
gst-plugins-good --with-gtk+3
works out of the box. Similar with exportingPKG_CONFIG_PATH
from within the formula. Thestack install happy
might be even a bigger problem.
from komposition.
@2mol Thank for the feedback!
-
I was thinking of setting up releases, or maybe an S3 bucket for those binaries, that the Homebrew script could download. Having the Homebrew formula compile from source seems like a bigger rabbit hole. With Homebrew, I suppose the executable would be dynamically linked, and not be a package including any other libraries, because Homebrew would supply the
.dylib
s throughdepends_on
rules. Do you know if Homebrew sets up something likeDYLD_LIBRARY_PATH
such that libraries are found automatically, or do we need to mess around with rpaths? -
If we don't compile from source in the formula, as mentioned above, those things shouldn't be problems. Only the runtime libraries will be needed (GTK, Gstreamer + plugins, FFmpeg, and maybe something else). But as you say, somehow passing the
--with-gtk+3
would still be needed.
from komposition.
I have written a Homebrew formula that seems to work fine:
require "language/haskell"
class Komposition < Formula
include Language::Haskell::Cabal
desc "Video editor built for screencasters"
homepage "https://github.com/owickstrom/komposition"
# url "https://github.com/owickstrom/komposition/archive/.tar.gz"
# sha256 ""
head "https://github.com/owickstrom/komposition.git"
depends_on "cabal-install" => :build
depends_on "ffmpeg"
depends_on "ghc" => :build
depends_on "gobject-introspection"
depends_on "gst-libav"
depends_on "gst-plugins-base"
depends_on "gst-plugins-good"
depends_on "gstreamer"
depends_on "gtk+3"
depends_on "gstreamer"
depends_on "libffi"
depends_on "pkg-config" => :build
depends_on "sox"
def install
# The --allow-newer-base may be removed if the ffmpeg-light bound
# is relaxed, or when Homebrew moves to Cabal 3 builds.
install_cabal_package "--allow-newer=base", :using => ["alex", "happy"]
end
test do
end
end
The missing points are:
-
Komposition must have a release tagged before this formula will be accepted in Homebrew-core. This is just a matter of tagging some commit
vX.Y.Z
and doesn't have to imply anything about stability or release announcements or whatnot. GitHub will generate the tarball and such. The nice thing is that as subsequent tags are made, there's tooling to update the formula as well. -
I'm not sure what the
test
block should contain. Homebrew insists on something more than running--version
, but can komposition do anything interesting on the command line? Maybe I should read up on how Homebrew normally handles GUI applications. -
Some of the dependencies may in fact just be build dependencies.
from komposition.
Note that if the formula gets put in Homebrew-core, they will take care of all the bottling and updates.
from komposition.
Regarding (2), I previously had a command line tool for splitting up videos, but it's no longer part of the codebase, IIRC. If you find some guidelines for GUI apps, that would be nice.
from komposition.
All I can find is this:
If the formula is for a GUI program, try to find some function that runs as command-line only, like a format conversion, reading or displaying a config file, etc.
However, I also find:
foo --version and foo --help are bad tests. However, a bad test is better than no test at all.
So I don't think it's a deal-breaker.
from komposition.
Sounds OK, then.
from komposition.
I'll still need you to tag a release before I can move this further.
from komposition.
Of course, here it is: https://github.com/owickstrom/komposition/releases/tag/v0.2.0
from komposition.
Thanks! I'll submit a Homebrew formula soon-ish, and then we'll see what they say.
from komposition.
@athas Great, thanks!
from komposition.
Awesome work, @athas !
from komposition.
The nice thing is that as subsequent tags are made, there's tooling to update the formula as well.
@athas how do we publish new versions in the future?
from komposition.
@owickstrom you just tag another release on GitHub. The formula must be updated, which you or I or someone else can submit a pull request for, but there are a bunch of people running scripts that look for new versions, so it usually happens automatically within a day or so. Those scripts just bump the tarball and hash though, so manual modification may be necessary if more non-Haskell dependencies are added.
from komposition.
Sounds good. And I suppose it's this file: https://github.com/Homebrew/homebrew-core/blob/7557e86f658cc3ae4abe627b92919538388c098d/Formula/komposition.rb ?
from komposition.
Related Issues (20)
- Install on Ubuntu 20 with Stack fails HOT 3
- Failure to build komposition 0.2.0 with ghc 8.8.4 on macOS HOT 1
- Brew's formula is disabled HOT 7
- Audio cut off too early HOT 7
- Edit clip speed HOT 4
- Previewing a clip with no audio crashes the preview dialog
- Transcode all import video files
- Getting times from timeline HOT 1
- Make gap duration adjustable in sidebar HOT 1
- Unable to Install on OSX 10.14.3 (Mojave) HOT 2
- Unable to build with Stack: 'gobject-introspection-1.0' version >=1.32 not found HOT 7
- Move to adjacent timeline part across parents
- Preview composition at currently focused time HOT 1
- Relocatable projects
- Add ability to edit audio durations HOT 6
- Arch linux pacman command is listed under "Windows" in installation doc HOT 1
- Build prerequisite brew install invalid option: --with-gtk+3 HOT 10
- Can't install on MacOS HOT 11
- Feature: speech recognition for visual feedback on audio HOT 4
- Fails to build with GHC 8.8.1 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from komposition.